Merge branch 'login' into 'master'

Small login corrections

See merge request 2009scape/2009scape!2195
This commit is contained in:
Player Name 2025-11-28 13:30:40 +00:00
commit a37abb7444
2 changed files with 20 additions and 26 deletions

View file

@ -326,7 +326,6 @@ public class Player extends Entity {
public void init() {
if (!artificial) {
log(this.getClass(), Log.INFO, getUsername() + " initialising...");
getDetails().getSession().setObject(this);
}
super.init();
LoginConfiguration.configureLobby(this);

View file

@ -33,33 +33,28 @@ class LoginParser(val details: PlayerDetails) {
Repository.removePlayer(player)
flag(AuthResponse.ErrorLoadingProfile)
}
GameWorld.Pulser.submit(object : Pulse(1) {
override fun pulse(): Boolean {
try {
if (details.session.isActive) {
player.properties.spawnLocation = getAttribute(player, "/save:spawnLocation", ServerConstants.HOME_LOCATION)
loginListeners.forEach(Consumer { listener: LoginListener -> listener.login(player) }) //Run our login hooks
parser.runContentHooks() //Run our saved-content-parsing hooks
player.details.session.setObject(player)
player.getDetails().accountInfo.lastUsedIp = player.getDetails().getIpAddress()
if (reconnect) {
reconnect(player)
} else {
flag(AuthResponse.Success)
player.init()
reinitVarps(player)
}
} else {
Repository.removePlayer(player)
}
} catch (t: Throwable) {
t.printStackTrace()
Repository.removePlayer(player)
flag(AuthResponse.ErrorLoadingProfile)
try {
if (details.session.isActive) {
player.properties.spawnLocation = getAttribute(player, "/save:spawnLocation", ServerConstants.HOME_LOCATION)
loginListeners.forEach(Consumer { listener: LoginListener -> listener.login(player) }) //Run our login hooks
parser.runContentHooks() //Run our saved-content-parsing hooks
player.details.session.setObject(player)
player.details.accountInfo.lastUsedIp = player.details.ipAddress
if (reconnect) {
reconnect(player)
} else {
flag(AuthResponse.Success)
player.init()
reinitVarps(player)
}
return true
} else {
Repository.removePlayer(player)
}
})
} catch (t: Throwable) {
t.printStackTrace()
Repository.removePlayer(player)
flag(AuthResponse.ErrorLoadingProfile)
}
}
/**