mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
This commit is contained in:
33
nms-patches/PlayerDatFileConverter.patch
Normal file
33
nms-patches/PlayerDatFileConverter.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
--- ../work/decompile-bb26c12b/net/minecraft/server/PlayerDatFileConverter.java 2014-11-27 08:59:46.857421159 +1100
|
||||
+++ src/main/java/net/minecraft/server/PlayerDatFileConverter.java 2014-11-27 08:42:10.168850880 +1100
|
||||
@@ -47,6 +47,30 @@
|
||||
private void a(File file, String s, String s1) {
|
||||
File file1 = new File(this.d, s + ".dat");
|
||||
File file2 = new File(file, s1 + ".dat");
|
||||
+
|
||||
+ // CraftBukkit start - Use old file name to seed lastKnownName
|
||||
+ NBTTagCompound root = null;
|
||||
+
|
||||
+ try {
|
||||
+ root = NBTCompressedStreamTools.a(new java.io.FileInputStream(file1));
|
||||
+ } catch (Exception exception) {
|
||||
+ exception.printStackTrace();
|
||||
+ }
|
||||
+
|
||||
+ if (root != null) {
|
||||
+ if (!root.hasKey("bukkit")) {
|
||||
+ root.set("bukkit", new NBTTagCompound());
|
||||
+ }
|
||||
+ NBTTagCompound data = root.getCompound("bukkit");
|
||||
+ data.setString("lastKnownName", s);
|
||||
+
|
||||
+ try {
|
||||
+ NBTCompressedStreamTools.a(root, new java.io.FileOutputStream(file2));
|
||||
+ } catch (Exception exception) {
|
||||
+ exception.printStackTrace();
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
NameReferencingFileConverter.a(file);
|
||||
if (!file1.renameTo(file2)) {
|
Reference in New Issue
Block a user