mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Merge branch 'login' into 'master'
Small login corrections See merge request 2009scape/2009scape!2195
This commit is contained in:
commit
a37abb7444
2 changed files with 20 additions and 26 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue