public void setId(String id) { try { uniqueId = Util.getUUID( id ); } catch ( Exception e ) { // Fallback on a valid uuid otherwise Minecraft complains uniqueId = md5UUID; } }
@Override public void done(String result, Throwable error) { if ( error == null ) { LoginResult obj = BungeeCord.getInstance().gson.fromJson( result, LoginResult.class ); if ( obj != null && obj.getId() != null ) { loginProfile = obj; name = obj.getName(); uniqueId = Util.getUUID( obj.getId() ); finish(); return; } disconnect( bungee.getTranslation( "offline_mode_player" ) ); } else { disconnect( bungee.getTranslation( "mojang_fail" ) ); bungee.getLogger().log( Level.SEVERE, "Error authenticating " + getName() + " with minecraft.net", error ); } } };
public void setId(String id) { try { uniqueId = Util.getUUID( id ); } catch ( Exception e ) { // Fallback on a valid uuid otherwise Minecraft complains uniqueId = md5UUID; } }
@Override public void done(String result, Throwable error) { if ( error == null ) { LoginResult obj = BungeeCord.getInstance().gson.fromJson( result, LoginResult.class ); if ( obj != null ) { loginProfile = obj; uniqueId = Util.getUUID( obj.getId() ); finish(); return; } disconnect( "Not authenticated with Minecraft.net" ); } else { disconnect( bungee.getTranslation( "mojang_fail" ) ); bungee.getLogger().log( Level.SEVERE, "Error authenticating " + getName() + " with minecraft.net", error ); } } };