mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-13 04:45:02 +01:00
Fix error when logging on a fresh account
This commit is contained in:
@@ -172,9 +172,16 @@ public class Player implements GameDatabaseObject {
|
||||
|
||||
public void setSession(GameSession session) {
|
||||
if (this.session != null) {
|
||||
// Sanity check
|
||||
if (this.session == session) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear player from session
|
||||
this.session.clearPlayer();
|
||||
}
|
||||
|
||||
// Set session
|
||||
this.session = session;
|
||||
}
|
||||
|
||||
|
||||
@@ -136,8 +136,7 @@ public class PlayerModule extends GameContextModule {
|
||||
// Put in player cache
|
||||
this.addToCache(player);
|
||||
|
||||
// Set player for session
|
||||
session.setPlayer(player);
|
||||
System.out.println("created player");
|
||||
|
||||
return player;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user