@Override public MapView createMap(World world) { net.minecraft.item.ItemStack stack = new net.minecraft.item.ItemStack(Item.map, 1, -1); MapData worldmap = ItemMap.getMPMapData((short) stack.getItemDamage(), ((CraftWorld) world).getHandle()); return (MapView) worldmap; }
/** * @author keepcalm * * @param id - the id of the map * @param world - the world of the map * * @return the map of that ID in that world. */ private MapView getMap(short id, World world) { MapData d = ItemMap.getMPMapData(id, ((BukkitWorld) world).getHandle()); return new BukkitMapView(d); }