Use Correct firstPlayed Value.

This commit is contained in:
md_5 2014-04-13 14:46:03 +10:00
parent eba34fbe49
commit 1384382aeb

View File

@ -0,0 +1,33 @@
From f7dccc2c54779dd1fb90bb73ab9892ace3b8ff91 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
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