Implement ItemFactory and ItemMeta values. Adds BUKKIT-15

This commit is contained in:
Wesley Wolfe
2012-12-17 01:31:41 -06:00
parent d20d4dc43a
commit 78f48258d8
70 changed files with 3773 additions and 313 deletions

View File

@@ -124,7 +124,7 @@ public class ContainerEnchantTable extends Container {
}
// CraftBukkit start
CraftItemStack item = new CraftItemStack(itemstack);
CraftItemStack item = CraftItemStack.asCraftMirror(itemstack);
PrepareItemEnchantEvent event = new PrepareItemEnchantEvent(player, this.getBukkitView(), this.world.getWorld().getBlockAt(this.x, this.y, this.z), item, this.costs, i);
this.world.getServer().getPluginManager().callEvent(event);
@@ -160,7 +160,7 @@ public class ContainerEnchantTable extends Container {
EnchantmentInstance instance = (EnchantmentInstance) obj;
enchants.put(org.bukkit.enchantments.Enchantment.getById(instance.enchantment.id), instance.level);
}
CraftItemStack item = new CraftItemStack(itemstack);
CraftItemStack item = CraftItemStack.asCraftMirror(itemstack);
EnchantItemEvent event = new EnchantItemEvent((Player) entityhuman.getBukkitEntity(), this.getBukkitView(), this.world.getWorld().getBlockAt(this.x, this.y, this.z), item, this.costs[i], enchants, i);
this.world.getServer().getPluginManager().callEvent(event);