-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: BloodredX <[email protected]> | ||
Date: Mon, 27 Jun 2022 19:17:06 +0300 | ||
Subject: [PATCH] Accept the EULA | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java | ||
index 4ef8eaad4485a2ee920f80556f9dda04e59d2b2a..4565aea8911f2fbd0dc71664f30b77dd0c621aa9 100644 | ||
--- a/src/main/java/net/minecraft/server/Main.java | ||
+++ b/src/main/java/net/minecraft/server/Main.java | ||
@@ -163,6 +163,20 @@ public class Main { | ||
System.err.println( "If you do not agree to the above EULA please stop your server and remove this flag immediately." ); | ||
} | ||
// Spigot End | ||
+ | ||
+ // Sakura start - accepts the eula.txt | ||
+ if (!eula.hasAgreedToEULA()) { | ||
+ Main.LOGGER.warn("Automatically accepting Mojang's EULA. Stop using Sakura only if you don't accept EULA of Mojang."); | ||
+ Main.LOGGER.warn("Note: this is a persistent change and will be saved in eula.txt since now."); | ||
+ try (java.io.OutputStream outputStream = java.nio.file.Files.newOutputStream(path2)) { | ||
+ var properties = new java.util.Properties(); | ||
+ properties.setProperty("eula", "true"); | ||
+ properties.store(outputStream, null); | ||
+ } | ||
+ eulaAgreed = true; | ||
+ } | ||
+ // Sakura 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."); | ||
+ Main.LOGGER.info("Accept EULA to run Sakura. Go to eula.txt > Find "eula=false > Change the boolean false to true."); | ||
return; |