@Override
public Void apply(JoinStatus result) {
GameEngine engine = CoreRegistry.get(GameEngine.class);
if (result.getStatus() != JoinStatus.Status.FAILED) {
engine.changeState(new StateLoading(result));
} else {
MessagePopup screen = manager.pushScreen(MessagePopup.ASSET_URI, MessagePopup.class);
screen.setMessage("Failed to Join", "Could not connect to server - " + result.getErrorMessage());
}