mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-27 04:55:25 +01:00
Use == operator for comparing EquipmentSlot values. Fixes #361
Because the == operator is null safe, we don't need to worry about null checking.
This commit is contained in:
parent
f212c657b0
commit
2fdfd64ddf
@ -978,7 +978,7 @@ public class ArenaListener
|
||||
}
|
||||
|
||||
// Bail if off-hand or if there's no block involved.
|
||||
if (event.getHand().equals(EquipmentSlot.OFF_HAND) || !event.hasBlock())
|
||||
if (event.getHand() == EquipmentSlot.OFF_HAND || !event.hasBlock())
|
||||
return;
|
||||
|
||||
// Iron block
|
||||
|
@ -254,7 +254,7 @@ public class SetupCommand implements Command, Listener {
|
||||
Player p = event.getPlayer();
|
||||
if (!p.equals(player)) return;
|
||||
|
||||
if (event.getHand().equals(EquipmentSlot.OFF_HAND)) return;
|
||||
if (event.getHand() == EquipmentSlot.OFF_HAND) return;
|
||||
|
||||
ItemStack tool = p.getItemInHand();
|
||||
if (!isTool(tool)) return;
|
||||
|
Loading…
Reference in New Issue
Block a user