From 4209e6184c2349fcecffdf04d23c918deabb39b3 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 16 Mar 2016 02:57:49 -0500 Subject: [PATCH] Someone questioned my professionality today --- .../0003-mc-dev-imports.patch | 70 ++++++++++++++++++- ...ient-crashes-server-lists-and-Mojang.patch | 16 ++++- 2 files changed, 84 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0003-mc-dev-imports.patch b/Spigot-Server-Patches/0003-mc-dev-imports.patch index f3e4567054..d719c0862d 100644 --- a/Spigot-Server-Patches/0003-mc-dev-imports.patch +++ b/Spigot-Server-Patches/0003-mc-dev-imports.patch @@ -1,4 +1,4 @@ -From 6823e7158ffb446622cb0bcba3f4a801e8fa4964 Mon Sep 17 00:00:00 2001 +From 7fe07e6b89792e266ed03fcf78705708ada7bf58 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 21:09:10 -0600 Subject: [PATCH] mc-dev imports @@ -4130,6 +4130,74 @@ index 0000000..871535c + 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 0000000..c872029 +--- /dev/null ++++ b/src/main/java/net/minecraft/server/EULA.java +@@ -0,0 +1,62 @@ ++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 0000000..b94444d diff --git a/Spigot-Server-Patches/0016-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0016-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 48504985e5..8d0a19ec8d 100644 --- a/Spigot-Server-Patches/0016-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0016-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -1,10 +1,24 @@ -From 451930ce992808fcdfd35ed1d385be7d1fb9c08b Mon Sep 17 00:00:00 2001 +From 091e2be48bc041dda7bf7e211200570c5a87af9c Mon Sep 17 00:00:00 2001 From: Zach Brown 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 +index c872029..21627dc 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) { + 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 4cc436d..11dbde5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java