Paper/Spigot-Server-Patches/0016-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch

102 lines
5.9 KiB
Diff
Raw Normal View History

2017-05-28 06:25:17 +02:00
From 40a8654adb652f624440c582b5a53550744a159a Mon Sep 17 00:00:00 2001
2015-01-29 22:25:50 +01:00
From: Zach Brown <zach.brown@destroystokyo.com>
2016-03-01 00:09:49 +01:00
Date: Tue, 1 Mar 2016 14:32:43 -0600
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
stats
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
2017-05-14 20:05:01 +02:00
index 8361888c2..3623751bf 100644
--- a/src/main/java/net/minecraft/server/EULA.java
+++ b/src/main/java/net/minecraft/server/EULA.java
@@ -51,7 +51,8 @@ public class EULA {
fileoutputstream = new FileOutputStream(this.b);
properties.setProperty("eula", "false");
- properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).");
+ properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula)." +
+ "\nand also agreeing that tacos are tasty."); // Paper - fix lag
} catch (Exception exception) {
2017-05-14 20:05:01 +02:00
EULA.a.warn("Failed to save {}", this.b, exception);
} finally {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
2017-05-24 00:11:28 +02:00
index 3629cbc47..476d1a23e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
2017-05-14 20:05:01 +02:00
@@ -1046,7 +1046,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
}
public String getServerModName() {
- return "Spigot"; // Spigot - Spigot > // CraftBukkit - cb > vanilla!
2016-03-01 00:09:49 +01:00
+ return "Paper"; //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
}
public CrashReport b(CrashReport crashreport) {
2016-03-01 00:09:49 +01:00
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
2017-05-24 00:11:28 +02:00
index 5c05ae407..bfc42b12f 100644
2016-03-01 00:09:49 +01:00
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
2017-05-24 00:11:28 +02:00
@@ -136,7 +136,7 @@ import net.md_5.bungee.api.chat.BaseComponent;
2016-03-01 00:09:49 +01:00
public final class CraftServer implements Server {
private static final Player[] EMPTY_PLAYER_ARRAY = new Player[0];
- private final String serverName = "CraftBukkit";
+ private final String serverName = "Paper";
private final String serverVersion;
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 30b6f3477..22cb680df 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -189,10 +189,10 @@ public class Main {
Date buildDate = new SimpleDateFormat("yyyyMMdd-HHmm").parse(Main.class.getPackage().getImplementationVendor());
Calendar deadline = Calendar.getInstance();
- deadline.add(Calendar.DAY_OF_YEAR, -3);
2017-05-28 06:25:17 +02:00
+ deadline.add(Calendar.DAY_OF_YEAR, -14); // Paper - Bump back to 14, this is pre-release anyway
if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***");
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/ ***");
+ System.err.println("*** Please download a new build as per instructions from https://paperci.emc.gs/ ***"); // Paper
System.err.println("*** Server will start in 15 seconds ***");
Thread.sleep(TimeUnit.SECONDS.toMillis(15));
}
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
2017-01-31 05:33:54 +01:00
index 94a3d4237..3ed983cc0 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -19,7 +19,7 @@ public class WatchdogThread extends Thread
private WatchdogThread(long timeoutTime, boolean restart)
{
- super( "Spigot Watchdog Thread" );
2016-03-01 00:09:49 +01:00
+ super( "Paper Watchdog Thread" );
this.timeoutTime = timeoutTime;
this.restart = restart;
}
@@ -56,9 +56,9 @@ public class WatchdogThread extends Thread
{
Logger log = Bukkit.getServer().getLogger();
log.log( Level.SEVERE, "The server has stopped responding!" );
- log.log( Level.SEVERE, "Please report this to http://www.spigotmc.org/" );
2016-03-01 00:09:49 +01:00
+ log.log( Level.SEVERE, "Please report this to https://aquifermc.org/" );
log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" );
- log.log( Level.SEVERE, "Spigot version: " + Bukkit.getServer().getVersion() );
2016-03-01 00:09:49 +01:00
+ log.log( Level.SEVERE, "Paper version: " + Bukkit.getServer().getVersion() );
//
if(net.minecraft.server.World.haveWeSilencedAPhysicsCrash)
{
@@ -68,7 +68,7 @@ public class WatchdogThread extends Thread
}
//
log.log( Level.SEVERE, "------------------------------" );
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Spigot!):" );
2016-03-01 00:09:49 +01:00
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" );
dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().primaryThread.getId(), Integer.MAX_VALUE ), log );
log.log( Level.SEVERE, "------------------------------" );
//
--
2017-05-24 00:11:28 +02:00
2.13.0.windows.1