Quick fix for respawning players not being able to get stuff from creative inventory

This commit is contained in:
Chiss 2014-04-27 01:09:25 +10:00
parent 95d6ec7f50
commit 82afefd11a

View File

@ -14,9 +14,11 @@ import nautilus.game.arcade.game.games.champions.kits.KitRanger;
import nautilus.game.arcade.game.games.common.Domination;
import nautilus.game.arcade.kit.Kit;
import org.bukkit.GameMode;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.EntityShootBowEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
public class ChampionsDominate extends Domination
{
@ -77,4 +79,14 @@ public class ChampionsDominate extends Domination
event.setCancelled(true);
}
}
@EventHandler
public void InventoryClick(InventoryClickEvent event)
{
if (event.getWhoClicked().getGameMode() == GameMode.CREATIVE)
{
event.setCancelled(true);
event.getWhoClicked().closeInventory();
}
}
}