Archiviert
13
0

Implement "isOnline" for temporary players.

This corrects the issue seen on http://pastebin.com/C4D8jsja
Dieser Commit ist enthalten in:
Kristian S. Stangeland 2013-05-06 18:37:08 +02:00
Ursprung 0fc6396974
Commit 8d814d2d9c

Datei anzeigen

@ -102,6 +102,8 @@ public class TemporaryPlayerFactory {
throw new IllegalStateException("Unable to find injector."); throw new IllegalStateException("Unable to find injector.");
// Use the socket to get the address // Use the socket to get the address
if (methodName.equalsIgnoreCase("isOnline"))
return injector.getSocket() != null && injector.getSocket().isConnected();
if (methodName.equalsIgnoreCase("getName")) if (methodName.equalsIgnoreCase("getName"))
return "UNKNOWN[" + injector.getSocket().getRemoteSocketAddress() + "]"; return "UNKNOWN[" + injector.getSocket().getRemoteSocketAddress() + "]";
if (methodName.equalsIgnoreCase("getPlayer")) if (methodName.equalsIgnoreCase("getPlayer"))