3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Revert "If we failed to unregister, don't fire the disconnect event"

This reverts commit 5822cc31d8.
Dieser Commit ist enthalten in:
Andrew Steinborn 2018-11-17 17:25:49 -05:00
Ursprung 5822cc31d8
Commit 74ee716480
2 geänderte Dateien mit 5 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -291,10 +291,9 @@ public class VelocityServer implements ProxyServer {
return true; return true;
} }
public boolean unregisterConnection(ConnectedPlayer connection) { public void unregisterConnection(ConnectedPlayer connection) {
boolean name = connectionsByName.remove(connection.getUsername().toLowerCase(Locale.US), connection); connectionsByName.remove(connection.getUsername().toLowerCase(Locale.US), connection);
boolean uuid = connectionsByUuid.remove(connection.getUniqueId(), connection); connectionsByUuid.remove(connection.getUniqueId(), connection);
return name && uuid;
} }
@Override @Override

Datei anzeigen

@ -432,10 +432,9 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
if (connectedServer != null) { if (connectedServer != null) {
connectedServer.disconnect(); connectedServer.disconnect();
} }
if (server.unregisterConnection(this)) { server.unregisterConnection(this);
server.getEventManager().fireAndForget(new DisconnectEvent(this)); server.getEventManager().fireAndForget(new DisconnectEvent(this));
} }
}
@Override @Override
public String toString() { public String toString() {