Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -16,8 +16,8 @@
try {
gameprofilebanlist.load();
} catch (IOException ioexception) {
- NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", gameprofilebanlist.b().getName(), ioexception);
+ NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", gameprofilebanlist.b().getName()); // CraftBukkit - don't print stacktrace
- NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", gameprofilebanlist.getFile().getName(), ioexception);
+ NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", gameprofilebanlist.getFile().getName()); // CraftBukkit - don't print stacktrace
}
}
@@ -25,8 +25,8 @@
try {
ipbanlist.load();
} catch (IOException ioexception) {
- NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", ipbanlist.b().getName(), ioexception);
+ NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", ipbanlist.b().getName()); // CraftBukkit - don't print stacktrace
- NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", ipbanlist.getFile().getName(), ioexception);
+ NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", ipbanlist.getFile().getName()); // CraftBukkit - don't print stacktrace
}
}
@@ -34,8 +34,8 @@
try {
oplist.load();
} catch (IOException ioexception) {
- NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", oplist.b().getName(), ioexception);
+ NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", oplist.b().getName()); // CraftBukkit - don't print stacktrace
- NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", oplist.getFile().getName(), ioexception);
+ NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", oplist.getFile().getName()); // CraftBukkit - don't print stacktrace
}
}
@@ -43,8 +43,8 @@
try {
whitelist.load();
} catch (IOException ioexception) {
- NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", whitelist.b().getName(), ioexception);
+ NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", whitelist.b().getName()); // CraftBukkit - don't print stacktrace
- NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", whitelist.getFile().getName(), ioexception);
+ NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", whitelist.getFile().getName()); // CraftBukkit - don't print stacktrace
}
}
@@ -56,26 +56,26 @@
+ NBTTagCompound root = null;
+
+ try {
+ root = NBTCompressedStreamTools.a(new java.io.FileInputStream(file5));
+ root = NBTCompressedStreamTools.readCompressed(new java.io.FileInputStream(file5));
+ } catch (Exception exception) {
+ exception.printStackTrace();
+ }
+
+ if (root != null) {
+ if (!root.hasKey("bukkit")) {
+ root.set("bukkit", new NBTTagCompound());
+ if (!root.contains("bukkit")) {
+ root.put("bukkit", new NBTTagCompound());
+ }
+ NBTTagCompound data = root.getCompound("bukkit");
+ data.setString("lastKnownName", s2);
+ data.putString("lastKnownName", s2);
+
+ try {
+ NBTCompressedStreamTools.a(root, new java.io.FileOutputStream(file2));
+ NBTCompressedStreamTools.writeCompressed(root, new java.io.FileOutputStream(file2));
+ } catch (Exception exception) {
+ exception.printStackTrace();
+ }
+ }
+ // CraftBukkit end
+
NameReferencingFileConverter.a(file4);
NameReferencingFileConverter.ensureDirectoryExists(file4);
if (!file5.renameTo(file6)) {
throw new NameReferencingFileConverter.FileConversionException("Could not convert file for " + s2);