* Players now cannot take their diguise block off their head. Fixes #26.
This commit is contained in:
parent
7ee6af029d
commit
fde0c51652
@ -16,6 +16,7 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.inventory.InventoryType.SlotType;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
@ -28,7 +29,7 @@ public class OnInventoryClickEvent implements Listener {
|
||||
|
||||
for (Arena arena : W.arenaList) {
|
||||
if (arena.playersInArena.contains(player)) {
|
||||
if (event.getSlot() == 8) {
|
||||
if (event.getSlot() == 8 || event.getSlotType() == SlotType.ARMOR) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user