mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-03 14:14:43 +02:00
Fixes #681
This commit is contained in:
@ -1135,9 +1135,15 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
||||
lb = new BukkitLazyBlock(blockId, block);
|
||||
final ItemStack hand = player.getItemInHand();
|
||||
if ((eventType != null) && !player.isSneaking()) {
|
||||
break;
|
||||
break;
|
||||
}
|
||||
Material type = hand == null ? null : hand.getType();
|
||||
int id = type == null ? 0 : type.getId();
|
||||
if ((hand == null) || (hand.getType() == Material.AIR) || hand.getType().isBlock()) {
|
||||
if (id == 0) {
|
||||
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
||||
lb = new BukkitLazyBlock(id, block);
|
||||
break;
|
||||
} else if (id < 198) {
|
||||
eventType = PlayerBlockEventType.PLACE_BLOCK;
|
||||
lb = new BukkitLazyBlock(id, block);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user