From 064453346dc5386c76d736bc682ab18b0699d080 Mon Sep 17 00:00:00 2001 From: CURVX Date: Sun, 11 Oct 2020 19:49:34 +0530 Subject: [PATCH 1/2] Resolves #2433 --- .../slimefun4/implementation/items/tools/GoldPan.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GoldPan.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GoldPan.java index aba6e1374..4baaeb12f 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GoldPan.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GoldPan.java @@ -12,6 +12,8 @@ import javax.annotation.ParametersAreNonnullByDefault; import org.bukkit.Effect; import org.bukkit.Material; import org.bukkit.block.Block; +import org.bukkit.entity.ItemFrame; +import org.bukkit.entity.Villager; import org.bukkit.inventory.ItemStack; import io.github.thebusybiscuit.cscorelib2.collections.RandomizedSet; @@ -141,7 +143,11 @@ public class GoldPan extends SimpleSlimefunItem implements Recip * @return the {@link EntityInteractHandler} of this {@link SlimefunItem} */ public EntityInteractHandler onEntityInteract() { - return (e, item, offHand) -> e.setCancelled(true); + return (e, item, offHand) -> { + if (!(e.getRightClicked() instanceof ItemFrame)) { + e.setCancelled(true); + } + }; } @Override From a9e64dbcfc25ebef89bb99c1a3229f0b7a67f1a5 Mon Sep 17 00:00:00 2001 From: CURVX Date: Sun, 11 Oct 2020 19:58:17 +0530 Subject: [PATCH 2/2] Resolves #2433 --- .../slimefun4/implementation/items/tools/GoldPan.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GoldPan.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GoldPan.java index 4baaeb12f..cf59ab075 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GoldPan.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GoldPan.java @@ -13,7 +13,6 @@ import org.bukkit.Effect; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.entity.ItemFrame; -import org.bukkit.entity.Villager; import org.bukkit.inventory.ItemStack; import io.github.thebusybiscuit.cscorelib2.collections.RandomizedSet;