~ Improvement for #26.
This commit is contained in:
parent
fde0c51652
commit
3ab1733d1a
@ -16,7 +16,6 @@ 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,8 +27,9 @@ public class OnInventoryClickEvent implements Listener {
|
||||
Player player = (Player) event.getWhoClicked();
|
||||
|
||||
for (Arena arena : W.arenaList) {
|
||||
if (arena.playersInArena.contains(player)) {
|
||||
if (event.getSlot() == 8 || event.getSlotType() == SlotType.ARMOR) {
|
||||
if (arena.playersInArena.contains(player)
|
||||
&& !arena.seekers.contains(player)) {
|
||||
if (event.getSlot() == 8 || event.getSlot() == 103) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user