use of org.apollo.game.service.GameService in project apollo by apollo-rsps.
the class LoginSession method handlePlayerLoaderResponse.
/**
* Handles a response from the login service.
*
* @param request The request this response corresponds to.
* @param response The response.
*/
public void handlePlayerLoaderResponse(LoginRequest request, PlayerLoaderResponse response) {
this.request = request;
GameService service = context.getGameService();
Optional<Player> optional = response.getPlayer();
if (optional.isPresent()) {
service.registerPlayer(optional.get(), this);
} else {
sendLoginFailure(response.getStatus());
}
}
Aggregations