From e75a3020e5b1c6fc0d267349b88ae7c2fa03d20c Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 8 Jul 2014 16:10:12 -0500 Subject: [PATCH] Upstream merge --- Bukkit | 2 +- CraftBukkit | 2 +- ...re-information-to-some-world-crashes.patch | 38 ----------- ... 0022-Player-Exhaustion-Multipliers.patch} | 0 ...despawn-distances-for-living-entiti.patch} | 0 ...errors-more-friendly-and-less-crashy.patch | 67 ------------------- ...sts.patch => 0024-Don-t-tick-chests.patch} | 0 MinecraftRelocate/pom.xml | 17 ++--- MinecraftServer/pom.xml | 52 ++++++++++++++ pom.xml | 3 +- 10 files changed, 61 insertions(+), 120 deletions(-) delete mode 100644 CraftBukkit-Patches/0022-Add-more-information-to-some-world-crashes.patch rename CraftBukkit-Patches/{0024-Player-Exhaustion-Multipliers.patch => 0022-Player-Exhaustion-Multipliers.patch} (100%) rename CraftBukkit-Patches/{0025-Add-configurable-despawn-distances-for-living-entiti.patch => 0023-Add-configurable-despawn-distances-for-living-entiti.patch} (100%) delete mode 100644 CraftBukkit-Patches/0023-Make-JSON-errors-more-friendly-and-less-crashy.patch rename CraftBukkit-Patches/{0026-Don-t-tick-chests.patch => 0024-Don-t-tick-chests.patch} (100%) create mode 100644 MinecraftServer/pom.xml diff --git a/Bukkit b/Bukkit index 41e89a9..cf0c216 160000 --- a/Bukkit +++ b/Bukkit @@ -1 +1 @@ -Subproject commit 41e89a96909667747c48d2d05980979f1334f4d0 +Subproject commit cf0c216b2c5a5c16646a5791612b49d97242ed90 diff --git a/CraftBukkit b/CraftBukkit index d6871d8..7a198ed 160000 --- a/CraftBukkit +++ b/CraftBukkit @@ -1 +1 @@ -Subproject commit d6871d8278cad9e472c32e8a81e1803126724933 +Subproject commit 7a198ed67cc4fae0609664e893493ebe475d723b diff --git a/CraftBukkit-Patches/0022-Add-more-information-to-some-world-crashes.patch b/CraftBukkit-Patches/0022-Add-more-information-to-some-world-crashes.patch deleted file mode 100644 index 47f990e..0000000 --- a/CraftBukkit-Patches/0022-Add-more-information-to-some-world-crashes.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 5fe47440dabafd1961f4acca2a29881a87699567 Mon Sep 17 00:00:00 2001 -From: Suddenly -Date: Sat, 5 Jul 2014 16:56:44 +0100 -Subject: [PATCH] Add more information to some world crashes - - -diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java -index efdcad7..907053d 100644 ---- a/src/main/java/net/minecraft/server/WorldNBTStorage.java -+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java -@@ -54,7 +54,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData { - } - } catch (IOException ioexception) { - ioexception.printStackTrace(); -- throw new RuntimeException("Failed to check session lock, aborting"); -+ throw new RuntimeException("Failed to check session lock for world located at " + this.baseDir + ", aborting. Stop the server and delete the session.lock in this world to prevent further issues."); // PaperSpigot - } - } - -@@ -69,13 +69,13 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData { - - try { - if (datainputstream.readLong() != this.sessionId) { -- throw new ExceptionWorldConflict("The save is being accessed from another location, aborting"); -+ throw new ExceptionWorldConflict("The save for world located at " + this.baseDir + " is being accessed from another location, aborting"); // PaperSpigot - } - } finally { - datainputstream.close(); - } - } catch (IOException ioexception) { -- throw new ExceptionWorldConflict("Failed to check session lock, aborting"); -+ throw new ExceptionWorldConflict("Failed to check session lock for world located at " + this.baseDir + ", aborting. Stop the server and delete the session.lock in this world to prevent further issues."); // PaperSpigot - } - } - --- -1.9.1 - diff --git a/CraftBukkit-Patches/0024-Player-Exhaustion-Multipliers.patch b/CraftBukkit-Patches/0022-Player-Exhaustion-Multipliers.patch similarity index 100% rename from CraftBukkit-Patches/0024-Player-Exhaustion-Multipliers.patch rename to CraftBukkit-Patches/0022-Player-Exhaustion-Multipliers.patch diff --git a/CraftBukkit-Patches/0025-Add-configurable-despawn-distances-for-living-entiti.patch b/CraftBukkit-Patches/0023-Add-configurable-despawn-distances-for-living-entiti.patch similarity index 100% rename from CraftBukkit-Patches/0025-Add-configurable-despawn-distances-for-living-entiti.patch rename to CraftBukkit-Patches/0023-Add-configurable-despawn-distances-for-living-entiti.patch diff --git a/CraftBukkit-Patches/0023-Make-JSON-errors-more-friendly-and-less-crashy.patch b/CraftBukkit-Patches/0023-Make-JSON-errors-more-friendly-and-less-crashy.patch deleted file mode 100644 index 7fd4b7e..0000000 --- a/CraftBukkit-Patches/0023-Make-JSON-errors-more-friendly-and-less-crashy.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 77bc2b87f2361bc3d936fd7041109ed71aa9a9a4 Mon Sep 17 00:00:00 2001 -From: Suddenly -Date: Mon, 16 Jun 2014 14:44:21 +0100 -Subject: [PATCH] Make JSON errors more friendly and less crashy - - -diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java -index 36dbcf6..97ee120 100644 ---- a/src/main/java/net/minecraft/server/JsonList.java -+++ b/src/main/java/net/minecraft/server/JsonList.java -@@ -9,6 +9,8 @@ import java.util.ArrayList; - import java.util.Collection; - import java.util.Iterator; - import java.util.Map; -+import java.io.FileNotFoundException; // PaperSpigot -+import java.util.logging.Level; // PaperSpigot - - import net.minecraft.util.com.google.common.base.Charsets; - import net.minecraft.util.com.google.common.collect.Lists; -@@ -20,6 +22,7 @@ import net.minecraft.util.com.google.gson.JsonObject; - import net.minecraft.util.org.apache.commons.io.IOUtils; - import org.apache.logging.log4j.LogManager; - import org.apache.logging.log4j.Logger; -+import net.minecraft.util.com.google.gson.JsonSyntaxException; // PaperSpigot - - public class JsonList { - -@@ -146,6 +149,13 @@ public class JsonList { - try { - bufferedreader = Files.newReader(this.c, Charsets.UTF_8); - collection = (Collection) this.b.fromJson(bufferedreader, f); -+ } catch (FileNotFoundException e) { // PaperSpigot Start -+ org.bukkit.Bukkit.getLogger().log(Level.WARNING, "Unable to find file {0}, creating new {0}.", this.c); -+ } catch (JsonSyntaxException jsonSyntaxEception) { -+ org.bukkit.Bukkit.getLogger().log(Level.WARNING, "Unable to read file {0}, backing up {0} at {0}.backup and creating new {0}.", this.c); -+ File backup = new File(this.c + ".backup"); -+ this.c.renameTo(backup); -+ this.c.delete(); // PaperSpigot End - } finally { - IOUtils.closeQuietly(bufferedreader); - } -diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index cc178c6..8729d03 100644 ---- a/src/main/java/net/minecraft/server/UserCache.java -+++ b/src/main/java/net/minecraft/server/UserCache.java -@@ -27,6 +27,7 @@ import net.minecraft.util.com.google.gson.GsonBuilder; - import net.minecraft.util.com.mojang.authlib.Agent; - import net.minecraft.util.com.mojang.authlib.GameProfile; - import net.minecraft.util.org.apache.commons.io.IOUtils; -+import net.minecraft.util.com.google.gson.JsonSyntaxException; // PaperSpigot - - public class UserCache { - -@@ -176,6 +177,10 @@ public class UserCache { - break label81; - } catch (FileNotFoundException filenotfoundexception) { - ; -+ } catch (JsonSyntaxException jsonSyntaxEception) { // PaperSpigot Start -+ System.err.printf("Usercache.json is corrupted or has bad formatting."); -+ System.err.printf("Deleting usercache.json to prevent further issues."); -+ this.g.delete(); // PaperSpigot End - } finally { - IOUtils.closeQuietly(bufferedreader); - } --- -1.9.1 - diff --git a/CraftBukkit-Patches/0026-Don-t-tick-chests.patch b/CraftBukkit-Patches/0024-Don-t-tick-chests.patch similarity index 100% rename from CraftBukkit-Patches/0026-Don-t-tick-chests.patch rename to CraftBukkit-Patches/0024-Don-t-tick-chests.patch diff --git a/MinecraftRelocate/pom.xml b/MinecraftRelocate/pom.xml index 23c0d22..4f6ae84 100644 --- a/MinecraftRelocate/pom.xml +++ b/MinecraftRelocate/pom.xml @@ -10,24 +10,17 @@ org.spigotmc - minecraft-server + minecraft-server-relocated 1.7.9-SNAPSHOT jar - Minecraft Server - - - - repobo-snap - http://repo.bukkit.org/content/groups/public - - + Minecraft Server Relocation - org.bukkit + org.spigotmc minecraft-server - 1.7.9 + ${project.version} compile @@ -69,4 +62,4 @@ - + \ No newline at end of file diff --git a/MinecraftServer/pom.xml b/MinecraftServer/pom.xml new file mode 100644 index 0000000..890e045 --- /dev/null +++ b/MinecraftServer/pom.xml @@ -0,0 +1,52 @@ + + 4.0.0 + + + org.spigotmc + spigot-parent + dev-SNAPSHOT + ../pom.xml + + + org.spigotmc + minecraft-server + 1.7.9-SNAPSHOT + jar + + Minecraft Server + + + + repobo-snap + http://repo.bukkit.org/content/groups/public + + + + + + org.bukkit + minecraft-server + 1.7.9 + compile + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 2.3 + + + package + + shade + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 151420d..65ffc5f 100644 --- a/pom.xml +++ b/pom.xml @@ -19,6 +19,7 @@ https://github.com/SpigotMC/Spigot + MinecraftServer MinecraftRelocate Spigot-Server Spigot-API @@ -45,4 +46,4 @@ http://repo.md-5.net/content/repositories/snapshots/ - + \ No newline at end of file