diff options
author | EvilSeph <evilseph@gmail.com> | 2012-03-10 15:39:29 -0500 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-03-10 15:52:56 -0500 |
commit | 68c89fcac94adb98aae752711e1fafc3fcae9d4c (patch) | |
tree | 4f6f6f3918e3a23b7d9ab5bd202275ca64c71820 | |
parent | 77ef0510958b7386b7f9b861aa7936f21a183a6b (diff) | |
download | craftbukkit-68c89fcac94adb98aae752711e1fafc3fcae9d4c.tar craftbukkit-68c89fcac94adb98aae752711e1fafc3fcae9d4c.tar.gz craftbukkit-68c89fcac94adb98aae752711e1fafc3fcae9d4c.tar.lz craftbukkit-68c89fcac94adb98aae752711e1fafc3fcae9d4c.tar.xz craftbukkit-68c89fcac94adb98aae752711e1fafc3fcae9d4c.zip |
Fixed enchanting in Creative. Fixes BUKKIT-1119
-rw-r--r-- | src/main/java/net/minecraft/server/ContainerEnchantTable.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/ContainerEnchantTable.java b/src/main/java/net/minecraft/server/ContainerEnchantTable.java index d321b1bd..dd550c1a 100644 --- a/src/main/java/net/minecraft/server/ContainerEnchantTable.java +++ b/src/main/java/net/minecraft/server/ContainerEnchantTable.java @@ -18,9 +18,8 @@ import org.bukkit.entity.Player; public class ContainerEnchantTable extends Container { - // CraftBukkit start - make type specific (changed from IInventory) + // CraftBukkit - make type specific (changed from IInventory) public ContainerEnchantTableInventory enchantSlots = new ContainerEnchantTableInventory(this, "Enchant", 1); - // CraftBukkit end private World world; private int x; private int y; @@ -163,7 +162,7 @@ public class ContainerEnchantTable extends Container { this.world.getServer().getPluginManager().callEvent(event); int level = event.getExpLevelCost(); - if (event.isCancelled() || (level > entityhuman.expLevel) || enchants.isEmpty()) { + if (event.isCancelled() || (level > entityhuman.expLevel && !entityhuman.abilities.canInstantlyBuild) || enchants.isEmpty()) { return false; } entityhuman.levelDown(level); |