Implement ItemFactory and ItemMeta values. Adds BUKKIT-15
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user