mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-24 09:19:27 +00:00
Accept EULA by default
This commit is contained in:
30
patches/server/0002-Accept-EULA.patch
Normal file
30
patches/server/0002-Accept-EULA.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Mon, 27 Mar 2023 13:16:41 +0300
|
||||
Subject: [PATCH] Accept EULA
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
--- a/src/main/java/net/minecraft/server/Main.java (revision 9a97ed83a411f9a65f590fd34ba4a71f1763d565)
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java (date 1679912132919)
|
||||
@@ -165,6 +165,20 @@
|
||||
System.err.println( "If you do not agree to the above EULA please stop your server and remove this flag immediately." );
|
||||
}
|
||||
// Spigot End
|
||||
+
|
||||
+ // DivineMC start - Accept EULA by default
|
||||
+ if (!eula.hasAgreedToEULA()) {
|
||||
+ Main.LOGGER.warn("Automatically accepting Mojang's EULA. Please, stop using this Software immediately if you do not agree with this.");
|
||||
+ Main.LOGGER.warn("Note: this is a persistent change and will be stored in eula.txt from now on.");
|
||||
+ try (java.io.OutputStream outputStream = java.nio.file.Files.newOutputStream(path1)) {
|
||||
+ var properties = new java.util.Properties();
|
||||
+ properties.setProperty("eula", "true");
|
||||
+ properties.store(outputStream, null);
|
||||
+ }
|
||||
+ eulaAgreed = true;
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
+
|
||||
if (!eula.hasAgreedToEULA() && !eulaAgreed) { // Spigot
|
||||
Main.LOGGER.info("You need to agree to the EULA in order to run the server. Go to eula.txt for more info.");
|
||||
return;
|
||||
Reference in New Issue
Block a user