Dieser Commit ist enthalten in:
Ursprung
0306500466
Commit
09f315f8b5
@ -24,6 +24,7 @@ import de.steamwar.towerrun.game.TowerRunGame;
|
|||||||
import de.steamwar.towerrun.game.TowerRunPlayer;
|
import de.steamwar.towerrun.game.TowerRunPlayer;
|
||||||
import de.steamwar.towerrun.state.GameStateBukkitListener;
|
import de.steamwar.towerrun.state.GameStateBukkitListener;
|
||||||
import de.steamwar.towerrun.state.GameStates;
|
import de.steamwar.towerrun.state.GameStates;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
@ -48,6 +49,10 @@ public class GlobalListener extends GameStateBukkitListener {
|
|||||||
TowerRunGame.remove(TowerRunPlayer.get(event.getPlayer()));
|
TowerRunGame.remove(TowerRunPlayer.get(event.getPlayer()));
|
||||||
}
|
}
|
||||||
TowerRunPlayer.remove(event.getPlayer());
|
TowerRunPlayer.remove(event.getPlayer());
|
||||||
|
|
||||||
|
if(Bukkit.getOnlinePlayers().isEmpty() || (Bukkit.getOnlinePlayers().size() == 1 && Bukkit.getOnlinePlayers().stream().allMatch(player -> player == event.getPlayer()))) {
|
||||||
|
Bukkit.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren