SHOW:
|
|
- or go back to the newest paste.
| 1 | - | InetSocketAddress isa = (InetSocketAddress) ((EntityClientPlayerMP) mc.thePlayer).sendQueue.netManager.remoteSocketAddress; |
| 1 | + | Field nmf = NetClientHandler.class.getField("netManager");
|
| 2 | Field rsaf = NetworkManager.class.getField("remoteSocketAddress");
| |
| 3 | Field.setAccessible(new Field[]{nmf, rsaf}, true);
| |
| 4 | InetSocketAddress isa = (InetSocketAddress) rsaf.get(nmf.get(((EntityClientPlayerMP) mc.thePlayer).sendQueue)); | |
| 5 | String hostname = isa.getHostString(); | |
| 6 | int ip = isa.getPort(); |