From a9a178466ce4443c94bb13beeede30108b0c932b Mon Sep 17 00:00:00 2001 From: ementalo Date: Sat, 16 Apr 2011 00:54:31 +0000 Subject: [PATCH] [trunk] restore a users saved inventory if they use invsee then logout git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1205 e251c2fe-e539-e718-e476-b85c1f46cddb --- .../earth2me/essentials/EssentialsPlayerListener.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 06d065a32..25bc02871 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -130,11 +130,18 @@ public class EssentialsPlayerListener extends PlayerListener @Override public void onPlayerQuit(PlayerQuitEvent event) { + User user = User.get(event.getPlayer()); + + if(user.savedInventory != null) + { + user.getInventory().setContents(user.savedInventory); + user.savedInventory = null; + } if (!Essentials.getSettings().getReclaimSetting()) { return; } - User.get(event.getPlayer()).dispose(); + user.dispose(); Thread thread = new Thread(new Runnable() { @SuppressWarnings("LoggerStringConcat")