mirror of
https://github.com/Melledy/Nebula.git
synced 2026-11-04 21:36:51 +01:00
Fix error when logging on a fresh account
This commit is contained in:
1 parent
51c12db822
commit
e1c7ae57e3
2 files changed
+8
-2
No files matched your search
@@ -172,9 +172,16 @@ public class Player implements GameDatabaseObject {
|
|||||||
|
|
||||||
public void setSession(GameSession session) {
|
public void setSession(GameSession session) {
|
||||||
if (this.session != null) {
|
if (this.session != null) {
|
||||||
|
// Sanity check
|
||||||
|
if (this.session == session) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear player from session
|
||||||
this.session.clearPlayer();
|
this.session.clearPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set session
|
||||||
this.session = session;
|
this.session = session;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -136,8 +136,7 @@ public class PlayerModule extends GameContextModule {
|
|||||||
// Put in player cache
|
// Put in player cache
|
||||||
this.addToCache(player);
|
this.addToCache(player);
|
||||||
|
|
||||||
// Set player for session
|
System.out.println("created player");
|
||||||
session.setPlayer(player);
|
|
||||||
|
|
||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user