Generate map with certain id

Discussion in 'Plugin Development' started by lecreep, Jan 23, 2021.

Thread Status:
Not open for further replies.
  1. Offline

    lecreep

    Im trying to put a certain map id on a Shulker inventory
    the map is placed but always says "unknown map"
    that should work, but no

    ItemStack item=new ItemStack(Material.FILLED_MAP, 1);
    MapMeta meta = (MapMeta) item.getItemMeta();
    meta.setMapId(1);
    item.setItemMeta(meta);


    I don't even know what to ask
     
  2. Offline

    Kars

    You should use setMapView as setMapId is deprecated.
    You could use Bukkit.getServer().getMap(1) to get the MapView, though Server#getMap is deprecated aswell.
     
Thread Status:
Not open for further replies.

Share This Page