This commit is contained in:
@@ -49,6 +49,7 @@ public class Server {
|
||||
this.acceptThread.cancel();
|
||||
this.logicThread.cancel();
|
||||
for (ServerConnexion connexion : this.connexions) {
|
||||
connexion.nukeConnection();
|
||||
connexion.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class ServerConnexion extends Connexion {
|
||||
|
||||
public void nukeConnection() {
|
||||
if (player != null) {
|
||||
sendPacket(new DisconnectPacket("Server stopped"));
|
||||
sendPacket(new DisconnectPacket("Le serveur a été fermé !"));
|
||||
this.server.broadcastPacket(new PlayerLeavePacket(player.getId()));
|
||||
this.server.getGame().removePlayer(player.getId());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user