Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/CraftBukkit-Patches/0118-Add-CommandLine-EULA-Flag.patch

35 Zeilen
2.0 KiB
Diff

2016-03-01 01:23:45 +01:00
From 49f7c06001e54932cb6b9b11d4dfaf182d97ffd5 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Wed, 9 Jul 2014 10:35:44 +1000
Subject: [PATCH] Add CommandLine EULA Flag
This flag contains the same message as eula.txt (albeit with proper grammar for 3rd person plural). By setting this flag you are agreeing to the terms listed in the message printed upon setting this flag, which are no different from those agreed to by any other method.
This feature only exists for hosting companies and people who manage servers in bulk who wish to agree to the terms by setting a flag in a script.
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
2016-03-01 01:23:45 +01:00
index 8a8e05b..0f8c10a 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
2016-02-29 22:33:06 +01:00
@@ -126,7 +126,16 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
2014-11-28 02:17:45 +01:00
DedicatedServer.LOGGER.info("Loading properties");
this.propertyManager = new PropertyManager(this.options); // CraftBukkit - CLI argument support
2016-02-29 22:33:06 +01:00
this.q = new EULA(new File("eula.txt"));
- if (!this.q.a()) {
+ // Spigot Start
+ boolean eulaAgreed = Boolean.getBoolean( "com.mojang.eula.agree" );
+ if ( eulaAgreed )
+ {
+ System.err.println( "You have used the Spigot command line EULA agreement flag." );
+ System.err.println( "By using this setting you are indicating your agreement to Mojang's EULA (https://account.mojang.com/documents/minecraft_eula)." );
+ System.err.println( "If you do not agree to the above EULA please stop your server and remove this flag immediately." );
+ }
+ // Spigot End
2016-02-29 22:33:06 +01:00
+ if (!this.q.a() && !eulaAgreed) { // Spigot
2014-11-28 02:17:45 +01:00
DedicatedServer.LOGGER.info("You need to agree to the EULA in order to run the server. Go to eula.txt for more info.");
2016-02-29 22:33:06 +01:00
this.q.b();
return false;
--
2016-02-29 22:33:06 +01:00
2.5.0