Solved Getting The Map Item From A MapView?

Discussion in 'Plugin Development' started by theCodeBro, Jul 6, 2013.

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

    theCodeBro

    I'm trying to create cards. These cards are maps, and I'm trying to give them a custom image and name. I have been able to make the custom view, but i don't know how to get the map item to give it to a player and rename it. Does anyone know how to do this?

    Code:
    Code:java
    1. //Making The Map
    2. private MapView item = Bukkit.createMap(player.getWorld());
    3.  
    4. //But How Do I get The Item?
     
  2. Offline

    desht

    PHP:
    ItemStack mapItem = new ItemStack(Material.MAP1mapView.getId());
    You can use the ItemMeta system to rename the map, and player.getInventory().addItem() to give it to a player.
     
  3. Offline

    theCodeBro

    Thnx a lot!
     
Thread Status:
Not open for further replies.

Share This Page