mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 17:07:34 +01:00
Upstream merge
This commit is contained in:
parent
2cac033679
commit
e75a3020e5
2
Bukkit
2
Bukkit
@ -1 +1 @@
|
||||
Subproject commit 41e89a96909667747c48d2d05980979f1334f4d0
|
||||
Subproject commit cf0c216b2c5a5c16646a5791612b49d97242ed90
|
@ -1 +1 @@
|
||||
Subproject commit d6871d8278cad9e472c32e8a81e1803126724933
|
||||
Subproject commit 7a198ed67cc4fae0609664e893493ebe475d723b
|
@ -1,38 +0,0 @@
|
||||
From 5fe47440dabafd1961f4acca2a29881a87699567 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 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
|
||||
|
@ -1,67 +0,0 @@
|
||||
From 77bc2b87f2361bc3d936fd7041109ed71aa9a9a4 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 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
|
||||
|
@ -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>
|
52
MinecraftServer/pom.xml
Normal file
52
MinecraftServer/pom.xml
Normal file
@ -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>
|
3
pom.xml
3
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>
|
Loading…
Reference in New Issue
Block a user