Put hiders in adventure mode
This commit is contained in:
parent
7bbfe0794b
commit
010d31bd9e
@ -17,6 +17,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.FireworkEffect;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
@ -370,12 +371,20 @@ public class HideSeek extends TeamGame
|
||||
StrictAntiHack = true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerTeleport(PlayerPrepareTeleportEvent event)
|
||||
{
|
||||
if(_hiders.GetPlayers(false).contains(event.GetPlayer()))
|
||||
{
|
||||
event.GetPlayer().setGameMode(GameMode.ADVENTURE);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onGameEndStart(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() == GameState.Prepare)
|
||||
{
|
||||
System.out.println("prep");
|
||||
this.getArcadeManager().getPacketHandler().addPacketHandler(_blockDisguise, PacketPlayOutSpawnEntityLiving.class, PacketPlayOutEntityDestroy.class);
|
||||
this.getArcadeManager().getPacketHandler().addPacketHandler(_useEntity, true, PacketPlayInUseEntity.class);
|
||||
} else if (event.GetState() == GameState.Dead)
|
||||
|
Loading…
Reference in New Issue
Block a user