mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-22 18:46:45 +01:00
Replace deprecated getItemInHand() calls in SetupCommand.
This commit is contained in:
parent
d0eb1cc487
commit
25dc6b577b
@ -241,7 +241,7 @@ public class SetupCommand implements Command, Listener {
|
||||
Player p = event.getPlayer();
|
||||
if (!p.equals(player)) return;
|
||||
|
||||
ItemStack tool = p.getItemInHand();
|
||||
ItemStack tool = p.getInventory().getItemInMainHand();
|
||||
if (!isTool(tool)) return;
|
||||
|
||||
event.setCancelled(true);
|
||||
@ -264,7 +264,7 @@ public class SetupCommand implements Command, Listener {
|
||||
|
||||
if (event.getHand() == EquipmentSlot.OFF_HAND) return;
|
||||
|
||||
ItemStack tool = p.getItemInHand();
|
||||
ItemStack tool = p.getInventory().getItemInMainHand();
|
||||
if (!isTool(tool)) return;
|
||||
|
||||
String name = tool.getItemMeta().getDisplayName();
|
||||
|
Loading…
Reference in New Issue
Block a user