I added 2 new API methods to login and register a player, these methods will return an AuthResult object
Code (Java):
PlayerAPI api
=new PlayerAPI
(player
);
AuthResult result
= api.
tryLogin(true);//AuthResult result = api.tryLogin(true, "You've been logged); //Also works with: AuthResult result
= api.
tryRegister("aRandomPassword");
switch(result
){ case OFFLINE
: case CANCELLED
: break; case SUCCESS
: case SUCCESS_TEMP
: System.
out.
printIn("YAY!"); break; case IDLE
: System.
out.
printIn("Processing..."); break; }