* Once again, fixed the bug that lets players take their disguise block off their head. Fixes #26.

This commit is contained in:
RandomPanda30 2013-10-08 21:15:06 +01:00
parent 769f2c684e
commit 1bf9b2b9c9

View File

@ -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;
@ -29,7 +30,7 @@ public class OnInventoryClickEvent implements Listener {
for (Arena arena : W.arenaList) {
if (arena.playersInArena.contains(player)
&& !arena.seekers.contains(player)) {
if (event.getSlot() == 8 || event.getSlot() == 103) {
if (event.getSlot() == 8 || event.getSlotType() == SlotType.ARMOR) {
event.setCancelled(true);
}
}