mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
[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
This commit is contained in:
parent
ed71a41578
commit
a9a178466c
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user