Hello everyone! I'm getting this *weird* error, whenever i try to execute this code: Code (Text): String IP = staff.getAddress().getAddress().getHostAddress().toString(); // Staff is a player obv // System.out.print(IP); Yet, it prints out the SERVER ip address, and not the player. Any help? Methods i tried and did not fix the problem: Code (Text): staff.getAddress().toString(); Code (Text): staff.getAddress().getAddress().toString(); NOTE: I am not connected using localhost. It's a hosted server by ScalaCube.
Thats just some bad naming... The first getAddress() returns an InetSocketAdress and the second returns InetAdress. Have you tried: staff.getAddress().getAddress().toString();