Ignore off-hand interactions for class signs and ready blocks. Fixes #340

This commit is contained in:
Andreas Troelsen 2017-02-10 15:52:44 +01:00
parent b7472dbc94
commit 7e049cdae6

View File

@ -35,6 +35,7 @@ import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.hanging.HangingBreakEvent;
import org.bukkit.event.player.*;
import org.bukkit.event.vehicle.VehicleExitEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
@ -975,8 +976,8 @@ public class ArenaListener
event.setCancelled(true);
}
// If there's no block involved, just return.
if (!event.hasBlock())
// Bail if off-hand or if there's no block involved.
if (event.getHand().equals(EquipmentSlot.OFF_HAND) || !event.hasBlock())
return;
// Iron block