SteamWar/MissileWars
Archiviert
13
0

Fix ConnectionListener for player leave

Dieser Commit ist enthalten in:
yoyosource 2021-06-22 08:05:43 +02:00
Ursprung 4468cf254a
Commit e47b9688a8

Datei anzeigen

@ -22,6 +22,7 @@ package de.steamwar.misslewars.listener;
import de.steamwar.misslewars.FightState;
import de.steamwar.misslewars.MWTeam;
import de.steamwar.misslewars.MissileWars;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@ -47,6 +48,10 @@ public class ConnectionListener extends BasicListener{
public void onLeave(PlayerQuitEvent e) {
MWTeam.removeInvitations(e.getPlayer());
MissileWars.leave(e.getPlayer());
if (Bukkit.getOnlinePlayers().isEmpty()) {
Bukkit.shutdown();
}
}
}