diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java index 4f19eed40..a56cf5b29 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java @@ -1769,7 +1769,13 @@ import java.util.regex.Pattern; if (area == null) { return; } - Material type = player.getInventory().getItemInMainHand().getType(); + ItemStack hand = player.getInventory().getItemInMainHand(); + ItemStack offHand = player.getInventory().getItemInOffHand(); + Material type = (hand == null) ? Material.AIR : hand.getType(); + Material offType = (offHand == null) ? Material.AIR : offHand.getType(); + if (type == Material.AIR) { + type = offType; + } if (type.toString().toLowerCase().endsWith("egg")) { Block block = player.getTargetBlockExact(5, FluidCollisionMode.SOURCE_ONLY); if (block != null && block.getType() != Material.AIR) {