SteamWar/FightSystem
Archiviert
13
1

Hotfix flying in arena issue

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2020-06-04 13:16:54 +02:00
Ursprung 77133bf72a
Commit d462d7d008

Datei anzeigen

@ -228,8 +228,15 @@ public class FightTeam implements IFightTeam{
return ready;
}
private void allowFlying(boolean fly){
for(FightPlayer p : players)
if(p.getPlayer() != null)
p.getPlayer().setAllowFlight(fly);
}
public void pasteSchematic(){
FreezeWorld freezer = new FreezeWorld();
allowFlying(true);
DyeColor c = ColorConverter.chat2dye(color);
EditSession e;
try {
@ -266,6 +273,7 @@ public class FightTeam implements IFightTeam{
broadcast(FightSystem.PREFIX + "§cFehler beim Pasten der Schematic");
throw new SecurityException("Error pasting arena in schematic", ex);
}
allowFlying(false);
Bukkit.getScheduler().runTaskLater(FightSystem.getPlugin(), () -> HandlerList.unregisterAll(freezer), 3);
Bukkit.getScheduler().runTaskLater(FightSystem.getPlugin(), this::teleportToSpawn,40);
}