mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2025-01-21 07:41:31 +01:00
Implement "isOnline" for temporary players.
This corrects the issue seen on http://pastebin.com/C4D8jsja
This commit is contained in:
parent
0fc6396974
commit
8d814d2d9c
@ -102,6 +102,8 @@ public class TemporaryPlayerFactory {
|
||||
throw new IllegalStateException("Unable to find injector.");
|
||||
|
||||
// Use the socket to get the address
|
||||
if (methodName.equalsIgnoreCase("isOnline"))
|
||||
return injector.getSocket() != null && injector.getSocket().isConnected();
|
||||
if (methodName.equalsIgnoreCase("getName"))
|
||||
return "UNKNOWN[" + injector.getSocket().getRemoteSocketAddress() + "]";
|
||||
if (methodName.equalsIgnoreCase("getPlayer"))
|
||||
|
Loading…
Reference in New Issue
Block a user