Fixes Item Taking From Chest Pre Fight
Dieser Commit ist enthalten in:
Ursprung
82dc627e36
Commit
c038d8a229
@ -89,6 +89,10 @@ public class ItemListener extends BasicListener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onInventoryClick(InventoryClickEvent event) {
|
public void onInventoryClick(InventoryClickEvent event) {
|
||||||
Inventory clicked = event.getClickedInventory();
|
Inventory clicked = event.getClickedInventory();
|
||||||
|
if(MissileWars.getFightState() != FightState.FIGHTING) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(event.getClick().isShiftClick()){
|
if(event.getClick().isShiftClick()){
|
||||||
ItemStack clickedOn = event.getCurrentItem();
|
ItemStack clickedOn = event.getCurrentItem();
|
||||||
|
|
||||||
@ -102,7 +106,7 @@ public class ItemListener extends BasicListener {
|
|||||||
clicked != null &&
|
clicked != null &&
|
||||||
clicked.getType() != InventoryType.PLAYER &&
|
clicked.getType() != InventoryType.PLAYER &&
|
||||||
event.getCursor() != null &&
|
event.getCursor() != null &&
|
||||||
event.getCursor().getType() != Material.AIR)
|
event.getCursor().getType() != Material.AIR )
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren