diff --git a/build.gradle b/build.gradle index 26ddfdf..1efbc9a 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { } group = 'dev.mending.sm' -version = '1.0.0' +version = '1.0.1' repositories { mavenCentral() diff --git a/src/main/java/dev/mending/sm/listener/PlayerInteractListener.java b/src/main/java/dev/mending/sm/listener/PlayerInteractListener.java index beb96f0..131a8a1 100644 --- a/src/main/java/dev/mending/sm/listener/PlayerInteractListener.java +++ b/src/main/java/dev/mending/sm/listener/PlayerInteractListener.java @@ -5,6 +5,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.ItemStack; @@ -19,6 +20,10 @@ public PlayerInteractListener(int restoreHealth) { @EventHandler public void onPlayerInteract(PlayerInteractEvent e) { + if (e.getAction().equals(Action.LEFT_CLICK_AIR) || e.getAction().equals(Action.LEFT_CLICK_BLOCK)) { + return; + } + if (e.getItem() != null && e.getItem().getType().equals(Material.MUSHROOM_STEW)) { final Player player = e.getPlayer(); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index a78d286..db1a311 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: SoupMechanics -version: '1.0.0' +version: '1.0.1' main: dev.mending.sm.SoupMechanics api-version: '1.21' authors: [ MrMending ]