mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 08:39:11 +00:00
Update World.java.
If the first operand is false (meaning the world is full) the bitwise AND operation will still check the second operand, thus adding them to the online players list. the player will never be unregistered (removed from the player list) because they they never registered. the server will always report them as online and logged in, even though this is not the case.
This commit is contained in:
@@ -329,7 +329,7 @@ public final class World {
|
||||
}
|
||||
|
||||
boolean success = playerRepository.add(player)
|
||||
& players.put(NameUtil.encodeBase37(player.getUsername().toLowerCase()), player) == null;
|
||||
&& players.put(NameUtil.encodeBase37(player.getUsername().toLowerCase()), player) == null;
|
||||
if (success) {
|
||||
logger.info("Registered player: " + player + " [count=" + playerRepository.size() + "]");
|
||||
|
||||
@@ -383,4 +383,4 @@ public final class World {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user