summaryrefslogtreecommitdiffstats
path: root/nms-patches/NameReferencingFileConverter.patch
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2014-11-26 08:32:16 +1100
committermd_5 <git@md-5.net>2014-11-28 17:16:30 +1100
commit24557bc2b37deb6a0edf497d547471832457b1dd (patch)
treec560572889a3b0b34964a0cddb35dc87fda3c914 /nms-patches/NameReferencingFileConverter.patch
parenta4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff)
downloadcraftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'nms-patches/NameReferencingFileConverter.patch')
-rw-r--r--nms-patches/NameReferencingFileConverter.patch76
1 files changed, 76 insertions, 0 deletions
diff --git a/nms-patches/NameReferencingFileConverter.patch b/nms-patches/NameReferencingFileConverter.patch
new file mode 100644
index 00000000..621762db
--- /dev/null
+++ b/nms-patches/NameReferencingFileConverter.patch
@@ -0,0 +1,76 @@
+--- ../work/decompile-bb26c12b/net/minecraft/server/NameReferencingFileConverter.java 2014-11-27 08:59:46.805421389 +1100
++++ src/main/java/net/minecraft/server/NameReferencingFileConverter.java 2014-11-27 08:42:10.168850880 +1100
+@@ -32,7 +32,7 @@
+ public static final File c = new File("ops.txt");
+ public static final File d = new File("white-list.txt");
+
+- static List a(File file, Map map) {
++ static List a(File file, Map map) throws IOException { // CraftBukkit - Added throws
+ List list = Files.readLines(file, Charsets.UTF_8);
+ Iterator iterator = list.iterator();
+
+@@ -77,9 +77,11 @@
+ if (gameprofilebanlist.c().exists()) {
+ try {
+ gameprofilebanlist.load();
+- } catch (FileNotFoundException filenotfoundexception) {
+- NameReferencingFileConverter.e.warn("Could not load existing file " + gameprofilebanlist.c().getName(), filenotfoundexception);
++ // CraftBukkit start - FileNotFoundException -> IOException, don't print stacetrace
++ } catch (IOException filenotfoundexception) {
++ e.warn("Could not load existing file " + gameprofilebanlist.c().getName() + ", " + filenotfoundexception.getMessage());
+ }
++ // CraftBukkit end
+ }
+
+ try {
+@@ -111,9 +113,11 @@
+ if (ipbanlist.c().exists()) {
+ try {
+ ipbanlist.load();
+- } catch (FileNotFoundException filenotfoundexception) {
+- NameReferencingFileConverter.e.warn("Could not load existing file " + ipbanlist.c().getName(), filenotfoundexception);
++ // CraftBukkit start - FileNotFoundException -> IOException, don't print stacetrace
++ } catch (IOException filenotfoundexception) {
++ e.warn("Could not load existing file " + ipbanlist.c().getName() + ", " + filenotfoundexception.getMessage());
+ }
++ // CraftBukkit end
+ }
+
+ try {
+@@ -152,9 +156,11 @@
+ if (oplist.c().exists()) {
+ try {
+ oplist.load();
+- } catch (FileNotFoundException filenotfoundexception) {
+- NameReferencingFileConverter.e.warn("Could not load existing file " + oplist.c().getName(), filenotfoundexception);
++ // CraftBukkit start - FileNotFoundException -> IOException, don't print stacetrace
++ } catch (IOException filenotfoundexception) {
++ e.warn("Could not load existing file " + oplist.c().getName() + ", " + filenotfoundexception.getMessage());
+ }
++ // CraftBukkit end
+ }
+
+ try {
+@@ -184,9 +190,11 @@
+ if (whitelist.c().exists()) {
+ try {
+ whitelist.load();
+- } catch (FileNotFoundException filenotfoundexception) {
+- NameReferencingFileConverter.e.warn("Could not load existing file " + whitelist.c().getName(), filenotfoundexception);
++ // CraftBukkit start - FileNotFoundException -> IOException, don't print stacetrace
++ } catch (IOException filenotfoundexception) {
++ e.warn("Could not load existing file " + whitelist.c().getName() + ", " + filenotfoundexception.getMessage());
+ }
++ // CraftBukkit end
+ }
+
+ try {
+@@ -351,7 +359,7 @@
+
+ private static File d(PropertyManager propertymanager) {
+ String s = propertymanager.getString("level-name", "world");
+- File file = new File(s);
++ File file = new File(MinecraftServer.getServer().server.getWorldContainer(), s); // CraftBukkit - Respect container setting
+
+ return new File(file, "players");
+ }