Fixed offline player data changes rollingback on relogin. Need to reproccess OfflinePlayer as a user, not declare it as a user. Tested and works perfectly.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1347 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
xeology 2011-05-05 04:32:32 +00:00
parent 5051bcb383
commit 6a0a724353

View file

@ -592,8 +592,9 @@ public class Essentials extends JavaPlugin
File userFolder = new File(getDataFolder(), "userdata");
File userFile = new File(userFolder, Util.sanitizeFileName(name) + ".yml");
if (userFile.exists())
{
return new User(new OfflinePlayer(name), this);
{ //Users do not get offline changes saved without being reproccessed as Users! ~ Xeology :)
User user=getUser((Player) new OfflinePlayer(name));
return user;
}
return null;
}