Paper/CraftBukkit-Patches/0135-Add-CommandLine-EULA-Flag.patch
Zach Brown 19972e09b8 Update SpigotMC's patches
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK
e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge
d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch
068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
2014-11-30 16:16:48 -06:00

35 lines
2.0 KiB
Diff

From 79775244d438c9a01ec9fb4ba2e66a8e65c9de27 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
index 80755dd..2806f1e 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -77,7 +77,16 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
DedicatedServer.LOGGER.info("Loading properties");
this.propertyManager = new PropertyManager(this.options); // CraftBukkit - CLI argument support
this.o = new EULA(new File("eula.txt"));
- if (!this.o.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
+ if (!this.o.a() && !eulaAgreed) { // Spigot
DedicatedServer.LOGGER.info("You need to agree to the EULA in order to run the server. Go to eula.txt for more info.");
this.o.b();
return false;
--
2.1.0