mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Someone questioned my professionality today
This commit is contained in:
parent
2a6b5b76de
commit
59ca434484
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user