Fix missed diff and other small things

This commit is contained in:
Travis Watkins
2014-04-13 04:29:01 -05:00
parent d82e34da59
commit 3dcf159ec1
8 changed files with 17 additions and 13 deletions

View File

@@ -208,7 +208,11 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
// CraftBukkit start
if (entityhuman instanceof EntityPlayer) {
CraftPlayer player = (CraftPlayer) entityhuman.bukkitEntity;
player.setFirstPlayed(new File(playerDir, entityhuman.getName() + ".dat").lastModified());
// Only update first played if it is older than the one we have
long modified = new File(this.playerDir, entityhuman.getUniqueID().toString() + ".dat").lastModified();
if (modified < player.getFirstPlayed()) {
player.setFirstPlayed(modified);
}
}
// CraftBukkit end