mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-27 04:55:25 +01:00
address github issue #299 (ignore offhand interact events thrown since Spigot 1.9)
This commit is contained in:
parent
3b88b889d6
commit
e6e4782de8
@ -24,6 +24,7 @@ import org.bukkit.event.player.PlayerDropItemEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.server.PluginDisableEvent;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
@ -254,6 +255,8 @@ public class SetupCommand implements Command, Listener {
|
||||
Player p = event.getPlayer();
|
||||
if (!p.equals(player)) return;
|
||||
|
||||
if (event.getHand().equals(EquipmentSlot.OFF_HAND)) return;
|
||||
|
||||
ItemStack tool = p.getItemInHand();
|
||||
if (!isTool(tool)) return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user