So, thanks to this lovely bug , I can't track IPs of people that I deny access to the server. How can I get around this? I don't want to just be tracking those who join, but those who attempt to join.
player.getAddress(); returns a InetSocketAddress try Code: public void onPlayerLogin(PlayerLoginEvent event) { Player player = event.getPlayer(); System.out.println(player.getAddress().getHostName()); } .getHostName() will return the ip address as a string like 127.0.0.1
You don't seem to have read the bug link I posted. You can't do player.getAddress() because for some reason at the time of PLAYER_LOGIN the Player doesn't have an address stored in the right place. I don't understand it because I figured if you can see the IP in the logs a moment later under disconnection. Does PLAYER_KICK fire for people who have been disconnected at the stage of PLAYER_LOGIN? That might be able to help me get around this bug for now, since after a month of it not being fixed I don't see it as being high priority.
kk nvm my bad so did not see your using onPlayerLogin. i dont think the address is stored when onPlayerLogin is called so to my knowledge there is no way to get it.
Does anyone have any ideas for this, such as would my KICK idea work? Does PLAYER_KICK fire for players rejected during PLAYER_LOGIN