summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
index f11182271..4ca588e6e 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
@@ -177,6 +177,19 @@ public class EssentialsPlayerListener implements Listener
{
user.getBase().getOpenInventory().getTopInventory().clear();
}
+
+ for (HumanEntity viewer : user.getBase().getInventory().getViewers())
+ {
+ if (viewer instanceof Player)
+ {
+ User uviewer = ess.getUser((Player)viewer);
+ if (uviewer.isInvSee())
+ {
+ uviewer.getBase().closeInventory();
+ }
+ }
+ }
+
user.updateActivity(false);
user.dispose();
}