Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
OptionParser optionParser = new OptionParser();
OptionSpec<Void> optionSpec = optionParser.accepts("nogui");
OptionSpec<Void> optionSpec1 = optionParser.accepts("initSettings", "Initializes 'server.properties' and 'eula.txt', then quits");
@@ -90,41 +_,94 @@
@@ -90,41 +_,96 @@
optionParser.printHelpOn(System.err);
return;
}
Expand Down Expand Up @@ -69,9 +69,11 @@
+ // Spigot start
+ boolean eulaAgreed = Boolean.getBoolean("com.mojang.eula.agree");
+ if (eulaAgreed) {
+ LOGGER.error("You have used the Spigot command line EULA agreement flag.");
+ LOGGER.error("By using this setting you are indicating your agreement to Mojang's EULA (https://aka.ms/MinecraftEULA).");
+ LOGGER.error("If you do not agree to the above EULA please stop your server and remove this flag immediately.");
+ // Paper start - not Spigot anymore and warn instead of error
+ LOGGER.warn("You have used the Paper command line EULA agreement flag.");
+ LOGGER.warn("By using this setting you are indicating your agreement to Mojang's EULA (https://aka.ms/MinecraftEULA).");
+ LOGGER.warn("If you do not agree to the above EULA please stop your server and remove this flag immediately.");
+ // Paper end - not Spigot anymore and warn instead of error
+ }
+ if (!eula.hasAgreedToEULA() && !eulaAgreed) {
Comment on lines 75 to 76
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could maybe even put this into an else-if statement instead, might be cleaner.

Suggested change
+ }
+ if (!eula.hasAgreedToEULA() && !eulaAgreed) {
+ } else if (!eula.hasAgreedToEULA()) {

+ // Spigot end
Expand Down