Update CraftBukkit to Minecraft 1.7.8
This commit is contained in:
@@ -24,14 +24,14 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
|
||||
private final File baseDir;
|
||||
private final File playerDir;
|
||||
private final File dataDir;
|
||||
private final long sessionId = MinecraftServer.aq();
|
||||
private final long sessionId = MinecraftServer.ar();
|
||||
private final String f;
|
||||
private UUID uuid = null; // CraftBukkit
|
||||
|
||||
public WorldNBTStorage(File file1, String s, boolean flag) {
|
||||
this.baseDir = new File(file1, s);
|
||||
this.baseDir.mkdirs();
|
||||
this.playerDir = new File(this.baseDir, "players");
|
||||
this.playerDir = new File(this.baseDir, "playerdata");
|
||||
this.dataDir = new File(this.baseDir, "data");
|
||||
this.dataDir.mkdirs();
|
||||
this.f = s;
|
||||
@@ -177,8 +177,8 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
|
||||
entityhuman.e(nbttagcompound);
|
||||
File file1 = new File(this.playerDir, entityhuman.getName() + ".dat.tmp");
|
||||
File file2 = new File(this.playerDir, entityhuman.getName() + ".dat");
|
||||
File file1 = new File(this.playerDir, entityhuman.getUniqueID().toString() + ".dat.tmp");
|
||||
File file2 = new File(this.playerDir, entityhuman.getUniqueID().toString() + ".dat");
|
||||
|
||||
NBTCompressedStreamTools.a(nbttagcompound, (OutputStream) (new FileOutputStream(file1)));
|
||||
if (file2.exists()) {
|
||||
@@ -192,7 +192,17 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
|
||||
}
|
||||
|
||||
public NBTTagCompound load(EntityHuman entityhuman) {
|
||||
NBTTagCompound nbttagcompound = this.getPlayerData(entityhuman.getName());
|
||||
NBTTagCompound nbttagcompound = null;
|
||||
|
||||
try {
|
||||
File file1 = new File(this.playerDir, entityhuman.getUniqueID().toString() + ".dat");
|
||||
|
||||
if (file1.exists() && file1.isFile()) {
|
||||
nbttagcompound = NBTCompressedStreamTools.a((InputStream) (new FileInputStream(file1)));
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
a.warn("Failed to load player data for " + entityhuman.getName());
|
||||
}
|
||||
|
||||
if (nbttagcompound != null) {
|
||||
// CraftBukkit start
|
||||
@@ -201,6 +211,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
|
||||
player.setFirstPlayed(new File(playerDir, entityhuman.getName() + ".dat").lastModified());
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
entityhuman.f(nbttagcompound);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user