diff --git a/src/main/java/net/seanomik/tamablefoxes/EntityTamableFox.java b/src/main/java/net/seanomik/tamablefoxes/EntityTamableFox.java index beccaaa..e879d7c 100644 --- a/src/main/java/net/seanomik/tamablefoxes/EntityTamableFox.java +++ b/src/main/java/net/seanomik/tamablefoxes/EntityTamableFox.java @@ -282,6 +282,9 @@ public class EntityTamableFox extends EntityFox { this.goalSit.setSitting(!this.isSitting()); return flag; } else if (entityhuman.isSneaking()) { // Swap/Put/Take item from fox. + // Ignore buckets since they can be easily duplicated. + if (itemstack.getItem() == Items.BUCKET || itemstack.getItem() == Items.LAVA_BUCKET || itemstack.getItem() == Items.WATER_BUCKET) return true; + if (!this.getEquipment(EnumItemSlot.MAINHAND).isEmpty()) { getBukkitEntity().getWorld().dropItem(getBukkitEntity().getLocation(), CraftItemStack.asBukkitCopy(this.getEquipment(EnumItemSlot.MAINHAND))); this.setSlot(EnumItemSlot.MAINHAND, new ItemStack(Items.AIR)); diff --git a/src/main/java/net/seanomik/tamablefoxes/TamableFoxes.java b/src/main/java/net/seanomik/tamablefoxes/TamableFoxes.java index 03d44a1..b21c987 100644 --- a/src/main/java/net/seanomik/tamablefoxes/TamableFoxes.java +++ b/src/main/java/net/seanomik/tamablefoxes/TamableFoxes.java @@ -14,11 +14,8 @@ import java.lang.reflect.Modifier; // @TODO: -/* @CHANGELOG (1.6.0): - * Code cleanup. - * Fixed low TPS issues. (If you run into any please DM me or create a github issue) - * When you tame a fox you now get the taming advancement. - * Added support for color codes in language.yml +/* @CHANGELOG (1.6.0-SNAPSHOT): + * Fix a bug of duplicating water/lava buckets. */ public final class TamableFoxes extends JavaPlugin implements Listener { private static TamableFoxes plugin;