Added some start-game invis to players.

This commit is contained in:
Chiss 2014-10-25 15:48:49 +11:00
parent cfcfad610f
commit 66b446f1e6

View File

@ -22,6 +22,7 @@ import org.bukkit.event.HandlerList;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.scoreboard.Team;
import org.bukkit.util.Vector;
import mineplex.core.common.util.C;
@ -38,6 +39,7 @@ import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.events.PlayerKitGiveEvent;
import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.games.dragonescape.kits.*;
import nautilus.game.arcade.kit.Kit;
@ -164,7 +166,10 @@ public class DragonEscape extends SoloGame
{
if (event.GetState() != GameState.Prepare)
return;
for (Team team : GetScoreboard().GetScoreboard().getTeams())
team.setCanSeeFriendlyInvisibles(true);
this.CreatureAllowOverride = true;
EnderDragon dragon = _dragon.getWorld().spawn(_dragon, EnderDragon.class);
this.CreatureAllowOverride = false;
@ -173,6 +178,12 @@ public class DragonEscape extends SoloGame
_dragonData = new DragonEscapeData(this, dragon, _waypoints.get(0));
}
@EventHandler
public void Invisibility(PlayerKitGiveEvent event)
{
Manager.GetCondition().Factory().Invisible(GetName(), event.GetPlayer(), event.GetPlayer(), 25, 0, false, false, false);
}
@EventHandler
public void MoveDragon(UpdateEvent event)