1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Merge pull request #2451 from CURVX/master

Fix #2433
This commit is contained in:
TheBusyBiscuit 2020-10-11 18:09:23 +02:00 committed by GitHub
commit f1dea4cab9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.Effect; import org.bukkit.Effect;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.ItemFrame;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.cscorelib2.collections.RandomizedSet; import io.github.thebusybiscuit.cscorelib2.collections.RandomizedSet;
@ -141,7 +142,11 @@ public class GoldPan extends SimpleSlimefunItem<ItemUseHandler> implements Recip
* @return the {@link EntityInteractHandler} of this {@link SlimefunItem} * @return the {@link EntityInteractHandler} of this {@link SlimefunItem}
*/ */
public EntityInteractHandler onEntityInteract() { public EntityInteractHandler onEntityInteract() {
return (e, item, offHand) -> e.setCancelled(true); return (e, item, offHand) -> {
if (!(e.getRightClicked() instanceof ItemFrame)) {
e.setCancelled(true);
}
};
} }
@Override @Override