Fix soups being used when players walk on pressure plates

This commit is contained in:
Spencer 2017-12-28 17:46:55 -05:00 committed by Alexander Meech
parent cc3ed60adc
commit 3dd0bb3e1c

View File

@ -5,6 +5,7 @@ import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.plugin.java.JavaPlugin;
@ -46,7 +47,7 @@ public class SoupAddon extends MiniPlugin
if (!UtilGear.isMat(player.getItemInHand(), Material.MUSHROOM_SOUP))
return;
if (UtilBlock.usable(event.getClickedBlock()))
if (UtilBlock.usable(event.getClickedBlock()) || event.getAction() == Action.PHYSICAL)
return;
//Effect