From eb43018ae2211b4257e418209fef1b922a03cf91 Mon Sep 17 00:00:00 2001 From: Europia79 Date: Thu, 25 Jun 2015 22:38:00 -0500 Subject: [PATCH 1/2] Fixes issue 3315 with VirtualPlayers http://youtrack.sk89q.com/issue/WORLDEDIT-3315 --- .../main/java/com/sk89q/worldedit/session/SessionManager.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/session/SessionManager.java b/worldedit-core/src/main/java/com/sk89q/worldedit/session/SessionManager.java index 60c788ca9..60849debc 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/session/SessionManager.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/session/SessionManager.java @@ -155,9 +155,7 @@ public class SessionManager { session.setBlockChangeLimit(config.defaultChangeLimit); // Remember the session if the session is still active - if (sessionKey.isActive()) { - sessions.put(getKey(owner), new SessionHolder(sessionKey, session)); - } + sessions.put(getKey(owner), new SessionHolder(sessionKey, session)); } // Set the limit on the number of blocks that an operation can From 780b39198790bf5eff9496b152abde9e0508ad73 Mon Sep 17 00:00:00 2001 From: Europia79 Date: Fri, 26 Jun 2015 00:09:09 -0500 Subject: [PATCH 2/2] Updated comment to reflect code changes --- .../main/java/com/sk89q/worldedit/session/SessionManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/session/SessionManager.java b/worldedit-core/src/main/java/com/sk89q/worldedit/session/SessionManager.java index 60849debc..c88ebd0ff 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/session/SessionManager.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/session/SessionManager.java @@ -154,7 +154,8 @@ public class SessionManager { session.setConfiguration(config); session.setBlockChangeLimit(config.defaultChangeLimit); - // Remember the session if the session is still active + // Remember the session regardless of if it's currently active or not. + // And have the SessionTracker FLUSH inactive sessions. sessions.put(getKey(owner), new SessionHolder(sessionKey, session)); }