mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-22 18:46:27 +01:00
985b5655f5
This has been in work for a bunch of time. Zoe ( duplexsystem or budgidiere, whatever ) has put a ton of work into this. We now have a bugfree build system that works flawlessly. Co-authored-by: Ivan Pekov <ivan@mrivanplays.com> Co-authored-by: Simon Gardling <titaniumtown@gmail.com> Co-authored-by: toinouH <toinouh2003@gmail.com> P.s the one who merged this is ivan and not bud.
40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: tr7zw <tr7zw@live.de>
|
|
Date: Sat, 25 Jul 2020 17:16:18 +0200
|
|
Subject: [PATCH] Global Eula file
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
|
|
index f88cf526d272fe47b5a474c0b344b748ee4009fa..4216448c4cb645fa6c61bad07c99abab5c9cd829 100644
|
|
--- a/src/main/java/net/minecraft/server/EULA.java
|
|
+++ b/src/main/java/net/minecraft/server/EULA.java
|
|
@@ -15,12 +15,25 @@ public class EULA {
|
|
|
|
public EULA(java.nio.file.Path java_nio_file_path) {
|
|
this.b = java_nio_file_path;
|
|
- this.c = SharedConstants.d || this.b();
|
|
+ this.c = SharedConstants.d || globalEula() || this.b(this.b); // Yatopia
|
|
}
|
|
|
|
- private boolean b() {
|
|
+ // Yatopia start
|
|
+ private boolean globalEula() {
|
|
+ java.io.File globalEula = new java.io.File(System.getProperty("user.home"), "eula.txt");
|
|
+
|
|
+ if (globalEula.exists()) {
|
|
+ return b(globalEula.toPath());
|
|
+ } else {
|
|
+ System.out.println("No global eula found at " + globalEula.getAbsolutePath());
|
|
+ }
|
|
+ return false;
|
|
+ }
|
|
+ // Yatopia end
|
|
+
|
|
+ private boolean b(java.nio.file.Path path) { // Yatopia
|
|
try {
|
|
- InputStream inputstream = Files.newInputStream(this.b);
|
|
+ InputStream inputstream = Files.newInputStream(path);
|
|
Throwable throwable = null;
|
|
|
|
boolean flag;
|