Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex
This commit is contained in:
commit
ad6f41e1c6
@ -285,11 +285,14 @@ public class GameFlagManager implements Listener
|
||||
if (!game.InProgress())
|
||||
return;
|
||||
|
||||
if (game.InventoryClick)
|
||||
return;
|
||||
|
||||
Player player = UtilPlayer.searchExact(event.getWhoClicked().getName());
|
||||
if (player != null && !game.IsAlive(player))
|
||||
return;
|
||||
|
||||
if (game.InventoryClick)
|
||||
|
||||
if (!game.IsAlive(player))
|
||||
return;
|
||||
|
||||
if (event.getInventory().getType() == InventoryType.CRAFTING)
|
||||
|
@ -156,12 +156,12 @@ public class GamePlayerManager implements Listener
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void InventoryClick(InventoryClickEvent event)
|
||||
public void DisallowCreativeClick(InventoryClickEvent event)
|
||||
{
|
||||
if (Manager.GetGame() == null || !Manager.GetGame().InProgress())
|
||||
return;
|
||||
|
||||
if (event.getWhoClicked().getGameMode() == GameMode.CREATIVE && event.getInventory().getType() == InventoryType.CREATIVE)
|
||||
if ((event.getInventory().getType() == InventoryType.CREATIVE || event.getInventory().getType() == InventoryType.PLAYER) && !event.getWhoClicked().isOp())
|
||||
{
|
||||
event.setCancelled(true);
|
||||
event.getWhoClicked().closeInventory();
|
||||
|
Loading…
Reference in New Issue
Block a user