Ignore logged out players.
Dieser Commit ist enthalten in:
Ursprung
627c500de1
Commit
169842f265
@ -124,6 +124,7 @@ class CleanupStaticMembers {
|
|||||||
reporter.reportWarning(this,
|
reporter.reportWarning(this,
|
||||||
Report.newBuilder(REPORT_CANNOT_RESET_FIELD).error(e).messageParam(field.getName(), e.getMessage())
|
Report.newBuilder(REPORT_CANNOT_RESET_FIELD).error(e).messageParam(field.getName(), e.getMessage())
|
||||||
);
|
);
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -343,6 +343,11 @@ class ProxyPlayerInjectionHandler implements PlayerInjectionHandler {
|
|||||||
|
|
||||||
// Get socket and socket injector
|
// Get socket and socket injector
|
||||||
SocketAddress address = injector.getAddress();
|
SocketAddress address = injector.getAddress();
|
||||||
|
|
||||||
|
// Ignore logged out players
|
||||||
|
if (address == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
SocketInjector previous = inputStreamLookup.peekSocketInjector(address);
|
SocketInjector previous = inputStreamLookup.peekSocketInjector(address);
|
||||||
|
|
||||||
// Close any previously associated hooks before we proceed
|
// Close any previously associated hooks before we proceed
|
||||||
@ -432,13 +437,18 @@ class ProxyPlayerInjectionHandler implements PlayerInjectionHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updatePlayer(Player player) {
|
public void updatePlayer(Player player) {
|
||||||
SocketInjector injector = inputStreamLookup.peekSocketInjector(player.getAddress());
|
SocketAddress address = player.getAddress();
|
||||||
|
|
||||||
if (injector != null) {
|
// Ignore logged out players
|
||||||
injector.setUpdatedPlayer(player);
|
if (address != null) {
|
||||||
} else {
|
SocketInjector injector = inputStreamLookup.peekSocketInjector(address);
|
||||||
inputStreamLookup.setSocketInjector(player.getAddress(),
|
|
||||||
new BukkitSocketInjector(player));
|
if (injector != null) {
|
||||||
|
injector.setUpdatedPlayer(player);
|
||||||
|
} else {
|
||||||
|
inputStreamLookup.setSocketInjector(player.getAddress(),
|
||||||
|
new BukkitSocketInjector(player));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren