fixed hosts not being able to use creative inventroy

This commit is contained in:
Cheese 2015-03-16 15:01:35 +11:00
parent efa2b649bd
commit c941c383e7

View File

@ -34,6 +34,7 @@ import mineplex.core.shop.page.ConfirmationPage;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.PlayerStateChangeEvent;
import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.Game.GameState;
@ -158,7 +159,7 @@ public class GamePlayerManager implements Listener
@EventHandler
public void DisallowCreativeClick(InventoryClickEvent event)
{
if (Manager.GetGame() == null || !Manager.GetGame().InProgress())
if (Manager.GetGame() == null || !Manager.GetGame().InProgress() || Manager.GetGameHostManager().isEventServer())
return;
if ((event.getInventory().getType() == InventoryType.CREATIVE || event.getInventory().getType() == InventoryType.PLAYER) && !event.getWhoClicked().isOp())