mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Fixes #2291
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
This commit is contained in:
parent
7b788c07b8
commit
cf1764723f
@ -1769,6 +1769,13 @@ import java.util.regex.Pattern;
|
||||
if (area == null) {
|
||||
return;
|
||||
}
|
||||
if (event.getAction() == Action.RIGHT_CLICK_AIR) {
|
||||
Material item = event.getItem().getType();
|
||||
if (item.toString().toLowerCase().endsWith("egg")) {
|
||||
event.setCancelled(true);
|
||||
event.setUseItemInHand(Event.Result.DENY);
|
||||
}
|
||||
}
|
||||
ItemStack hand = player.getInventory().getItemInMainHand();
|
||||
ItemStack offHand = player.getInventory().getItemInOffHand();
|
||||
Material type = (hand == null) ? Material.AIR : hand.getType();
|
||||
|
Loading…
Reference in New Issue
Block a user