mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Use last index of : instead of first to remove port
This commit is contained in:
parent
2bc15db6d0
commit
0e8b8315a2
@ -117,7 +117,7 @@ public class PlayerOnlineListener implements Listener {
|
||||
boolean banned = result == PlayerLoginEvent.Result.KICK_BANNED;
|
||||
String joinAddress = event.getHostname();
|
||||
if (!joinAddress.isEmpty()) {
|
||||
joinAddresses.put(playerUUID, joinAddress.substring(0, joinAddress.indexOf(":")));
|
||||
joinAddresses.put(playerUUID, joinAddress.substring(0, joinAddress.lastIndexOf(':')));
|
||||
}
|
||||
dbSystem.getDatabase().executeTransaction(new BanStatusTransaction(playerUUID, () -> banned));
|
||||
dbSystem.getDatabase().executeTransaction(new OperatorStatusTransaction(playerUUID, operator));
|
||||
|
Loading…
Reference in New Issue
Block a user