Fix ConnectionListener for player leave
Dieser Commit ist enthalten in:
Ursprung
4468cf254a
Commit
e47b9688a8
@ -22,6 +22,7 @@ package de.steamwar.misslewars.listener;
|
|||||||
import de.steamwar.misslewars.FightState;
|
import de.steamwar.misslewars.FightState;
|
||||||
import de.steamwar.misslewars.MWTeam;
|
import de.steamwar.misslewars.MWTeam;
|
||||||
import de.steamwar.misslewars.MissileWars;
|
import de.steamwar.misslewars.MissileWars;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
@ -47,6 +48,10 @@ public class ConnectionListener extends BasicListener{
|
|||||||
public void onLeave(PlayerQuitEvent e) {
|
public void onLeave(PlayerQuitEvent e) {
|
||||||
MWTeam.removeInvitations(e.getPlayer());
|
MWTeam.removeInvitations(e.getPlayer());
|
||||||
MissileWars.leave(e.getPlayer());
|
MissileWars.leave(e.getPlayer());
|
||||||
|
|
||||||
|
if (Bukkit.getOnlinePlayers().isEmpty()) {
|
||||||
|
Bukkit.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren