diff --git a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index f574cf5516..1a8232151e 100644 --- a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -5,6 +5,20 @@ 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 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/EULA.java ++++ b/src/main/java/net/minecraft/server/EULA.java +@@ -0,0 +0,0 @@ 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) { + 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 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/Spigot-Server-Patches/mc-dev-imports.patch b/Spigot-Server-Patches/mc-dev-imports.patch index f12b1b57b0..2f6fef6d57 100644 --- a/Spigot-Server-Patches/mc-dev-imports.patch +++ b/Spigot-Server-Patches/mc-dev-imports.patch @@ -4130,6 +4130,74 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return !astring[0].equalsIgnoreCase("players") ? (astring[0].equalsIgnoreCase("teams") ? i == 2 : false) : (astring.length > 1 && astring[1].equalsIgnoreCase("operation") ? i == 2 || i == 5 : i == 2); + } +} +diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java +new file mode 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 +--- /dev/null ++++ b/src/main/java/net/minecraft/server/EULA.java +@@ -0,0 +0,0 @@ ++package net.minecraft.server; ++ ++import java.io.File; ++import java.io.FileInputStream; ++import java.io.FileOutputStream; ++import java.util.Properties; ++import org.apache.commons.io.IOUtils; ++import org.apache.logging.log4j.LogManager; ++import org.apache.logging.log4j.Logger; ++ ++public class EULA { ++ ++ private static final Logger a = LogManager.getLogger(); ++ private final File b; ++ private final boolean c; ++ ++ public EULA(File file) { ++ this.b = file; ++ this.c = this.a(file); ++ } ++ ++ private boolean a(File file) { ++ FileInputStream fileinputstream = null; ++ boolean flag = false; ++ ++ try { ++ Properties properties = new Properties(); ++ ++ fileinputstream = new FileInputStream(file); ++ properties.load(fileinputstream); ++ flag = Boolean.parseBoolean(properties.getProperty("eula", "false")); ++ } catch (Exception exception) { ++ EULA.a.warn("Failed to load " + file); ++ this.b(); ++ } finally { ++ IOUtils.closeQuietly(fileinputstream); ++ } ++ ++ return flag; ++ } ++ ++ public boolean a() { ++ return this.c; ++ } ++ ++ public void b() { ++ FileOutputStream fileoutputstream = null; ++ ++ try { ++ Properties properties = new Properties(); ++ ++ 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)."); ++ } catch (Exception exception) { ++ EULA.a.warn("Failed to save " + this.b, exception); ++ } finally { ++ IOUtils.closeQuietly(fileoutputstream); ++ } ++ ++ } ++} diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000