From 18df89d601164092f62e2a76928348890573befd Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Tue, 8 Jul 2014 16:10:12 -0500 Subject: [PATCH] Upstream merge --- Bukkit | 2 +- CraftBukkit | 2 +- ...re-information-to-some-world-crashes.patch | 36 ---------- ... 0022-Player-Exhaustion-Multipliers.patch} | 0 ...despawn-distances-for-living-entiti.patch} | 0 ...errors-more-friendly-and-less-crashy.patch | 65 ------------------- ...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(+), 116 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 41e89a9690..cf0c216b2c 160000 --- a/Bukkit +++ b/Bukkit @@ -1 +1 @@ -Subproject commit 41e89a96909667747c48d2d05980979f1334f4d0 +Subproject commit cf0c216b2c5a5c16646a5791612b49d97242ed90 diff --git a/CraftBukkit b/CraftBukkit index d6871d8278..7a198ed67c 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 21ffcbc5a5..0000000000 --- a/CraftBukkit-Patches/0022-Add-more-information-to-some-world-crashes.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Suddenly <suddenly@suddenly.coffee> -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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/WorldNBTStorage.java -+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java -@@ -0,0 +0,0 @@ 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 - } - } - -@@ -0,0 +0,0 @@ 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 - } - } - --- \ No newline at end of file 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 09ae2aea5f..0000000000 --- a/CraftBukkit-Patches/0023-Make-JSON-errors-more-friendly-and-less-crashy.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Suddenly <suddenly@suddenly.coffee> -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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/JsonList.java -+++ b/src/main/java/net/minecraft/server/JsonList.java -@@ -0,0 +0,0 @@ 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; -@@ -0,0 +0,0 @@ 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 { - -@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/UserCache.java -+++ b/src/main/java/net/minecraft/server/UserCache.java -@@ -0,0 +0,0 @@ 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 { - -@@ -0,0 +0,0 @@ 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); - } --- \ No newline at end of file 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 23c0d22160..4f6ae84b90 100644 --- a/MinecraftRelocate/pom.xml +++ b/MinecraftRelocate/pom.xml @@ -10,24 +10,17 @@ </parent> <groupId>org.spigotmc</groupId> - <artifactId>minecraft-server</artifactId> + <artifactId>minecraft-server-relocated</artifactId> <version>1.7.9-SNAPSHOT</version> <packaging>jar</packaging> - <name>Minecraft Server</name> - - <repositories> - <repository> - <id>repobo-snap</id> - <url>http://repo.bukkit.org/content/groups/public</url> - </repository> - </repositories> + <name>Minecraft Server Relocation</name> <dependencies> <dependency> - <groupId>org.bukkit</groupId> + <groupId>org.spigotmc</groupId> <artifactId>minecraft-server</artifactId> - <version>1.7.9</version> + <version>${project.version}</version> <scope>compile</scope> </dependency> </dependencies> @@ -69,4 +62,4 @@ </plugin> </plugins> </build> -</project> +</project> \ No newline at end of file diff --git a/MinecraftServer/pom.xml b/MinecraftServer/pom.xml new file mode 100644 index 0000000000..890e045628 --- /dev/null +++ b/MinecraftServer/pom.xml @@ -0,0 +1,52 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.spigotmc</groupId> + <artifactId>spigot-parent</artifactId> + <version>dev-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <groupId>org.spigotmc</groupId> + <artifactId>minecraft-server</artifactId> + <version>1.7.9-SNAPSHOT</version> + <packaging>jar</packaging> + + <name>Minecraft Server</name> + + <repositories> + <repository> + <id>repobo-snap</id> + <url>http://repo.bukkit.org/content/groups/public</url> + </repository> + </repositories> + + <dependencies> + <dependency> + <groupId>org.bukkit</groupId> + <artifactId>minecraft-server</artifactId> + <version>1.7.9</version> + <scope>compile</scope> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>2.3</version> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file diff --git a/pom.xml b/pom.xml index 151420d6cf..65ffc5f164 100644 --- a/pom.xml +++ b/pom.xml @@ -19,6 +19,7 @@ <url>https://github.com/SpigotMC/Spigot</url> <modules> + <module>MinecraftServer</module> <module>MinecraftRelocate</module> <module>Spigot-Server</module> <module>Spigot-API</module> @@ -45,4 +46,4 @@ <url>http://repo.md-5.net/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement> -</project> +</project> \ No newline at end of file