Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-24 15:20:35 +01:00
Revert "If we failed to unregister, don't fire the disconnect event"
This reverts commit 5822cc31d8
.
Dieser Commit ist enthalten in:
Ursprung
5822cc31d8
Commit
74ee716480
@ -291,10 +291,9 @@ public class VelocityServer implements ProxyServer {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean unregisterConnection(ConnectedPlayer connection) {
|
||||
boolean name = connectionsByName.remove(connection.getUsername().toLowerCase(Locale.US), connection);
|
||||
boolean uuid = connectionsByUuid.remove(connection.getUniqueId(), connection);
|
||||
return name && uuid;
|
||||
public void unregisterConnection(ConnectedPlayer connection) {
|
||||
connectionsByName.remove(connection.getUsername().toLowerCase(Locale.US), connection);
|
||||
connectionsByUuid.remove(connection.getUniqueId(), connection);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -432,10 +432,9 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
||||
if (connectedServer != null) {
|
||||
connectedServer.disconnect();
|
||||
}
|
||||
if (server.unregisterConnection(this)) {
|
||||
server.unregisterConnection(this);
|
||||
server.getEventManager().fireAndForget(new DisconnectEvent(this));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren