diff options
author | md_5 <git@md-5.net> | 2015-01-05 09:59:31 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2015-03-13 17:48:57 +1100 |
commit | bbe75338c18624e66efd56b599d82eb476e5b76c (patch) | |
tree | 0220fa5f98cce7d52a3761c9996e216956d56eb5 /src | |
parent | 5750ab640a955a0fd141da45fe589f67ab5f74e6 (diff) | |
download | craftbukkit-bbe75338c18624e66efd56b599d82eb476e5b76c.tar craftbukkit-bbe75338c18624e66efd56b599d82eb476e5b76c.tar.gz craftbukkit-bbe75338c18624e66efd56b599d82eb476e5b76c.tar.lz craftbukkit-bbe75338c18624e66efd56b599d82eb476e5b76c.tar.xz craftbukkit-bbe75338c18624e66efd56b599d82eb476e5b76c.zip |
SPIGOT-323: Enchanting tables can no longer be force opened.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java index 84999fd4..f40e72a9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -1,5 +1,6 @@ package org.bukkit.craftbukkit.entity; +import com.google.common.base.Preconditions; import java.util.Set; import net.minecraft.server.*; @@ -284,7 +285,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return getHandle().activeContainer.getBukkitView(); } + @Override + public InventoryView openEnchanting(Location location) { + return openEnchanting(location, false); + } + + @Override public InventoryView openEnchanting(Location location, boolean force) { + Preconditions.checkArgument(!force, "Cannot force open enchanting tables!"); + if (!force) { Block block = location.getBlock(); if (block.getType() != Material.ENCHANTMENT_TABLE) { |