Fixed issues with host lookup from hosts file

I have values set in my hosts file and the original way of getting the address returnned the hostname it was linked to.
This commit is contained in:
NorbiPeti
2016-04-03 03:00:55 +02:00
parent 25e182148f
commit cc8c49e25b

View File

@ -51,7 +51,7 @@ public class BukkitJoinListener implements Listener {
public void run() {
if (player.isOnline()) {
//remove the bungeecord identifier
String id = '/' + player.getAddress().getHostString() + ':' + player.getAddress().getPort();
String id = '/' + player.getAddress().getAddress().getHostAddress() + ':' + player.getAddress().getPort();
PlayerSession session = plugin.getSessions().get(id);
//blacklist this target player for BungeeCord Id brute force attacks