From 1384382aeba08900e793fb13bb1ab78e713fe8e4 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 13 Apr 2014 14:46:03 +1000 Subject: [PATCH] Use Correct firstPlayed Value. --- .../0132-Use-Correct-firstPlayed-Value.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 CraftBukkit-Patches/0132-Use-Correct-firstPlayed-Value.patch diff --git a/CraftBukkit-Patches/0132-Use-Correct-firstPlayed-Value.patch b/CraftBukkit-Patches/0132-Use-Correct-firstPlayed-Value.patch new file mode 100644 index 0000000000..983ed9d69a --- /dev/null +++ b/CraftBukkit-Patches/0132-Use-Correct-firstPlayed-Value.patch @@ -0,0 +1,33 @@ +From f7dccc2c54779dd1fb90bb73ab9892ace3b8ff91 Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Sun, 13 Apr 2014 14:45:57 +1000 +Subject: [PATCH] Use Correct firstPlayed Value. + + +diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java +index 89ba461..8f2de94 100644 +--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java ++++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java +@@ -194,8 +194,9 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData { + public NBTTagCompound load(EntityHuman entityhuman) { + NBTTagCompound nbttagcompound = null; + ++ File file1 = null; // Spigot + try { +- File file1 = new File(this.playerDir, entityhuman.getUniqueID().toString() + ".dat"); ++ file1 = new File(this.playerDir, entityhuman.getUniqueID().toString() + ".dat"); // Spigot + // Spigot Start + boolean usingWrongFile = false; + if ( !file1.exists() ) +@@ -226,7 +227,7 @@ 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()); ++ player.setFirstPlayed(file1.lastModified()); // Spigot + } + // CraftBukkit end + +-- +1.8.3.2 +