Move "use-display-name-in-quit-message" to settings namespace (#6257)

This commit is contained in:
MeFisto94 2021-07-26 01:11:44 +02:00
parent b7ac1102ba
commit 7dc5d71367
4 changed files with 11 additions and 7 deletions

View file

@ -84,8 +84,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
commands.put("paper", new PaperCommand("paper")); commands.put("paper", new PaperCommand("paper"));
+ commands.put("mspt", new MSPTCommand("mspt")); + commands.put("mspt", new MSPTCommand("mspt"));
version = getInt("config-version", 20); version = getInt("config-version", 21);
set("config-version", 20); set("config-version", 21);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java

View file

@ -17,7 +17,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+ public static boolean useDisplayNameInQuit = false; + public static boolean useDisplayNameInQuit = false;
+ private static void useDisplayNameInQuit() { + private static void useDisplayNameInQuit() {
+ useDisplayNameInQuit = getBoolean("use-display-name-in-quit-message", useDisplayNameInQuit); + if (version < 21) {
+ boolean oldValue = getBoolean("use-display-name-in-quit-message", useDisplayNameInQuit);
+ set("settings.use-display-name-in-quit-message", oldValue);
+ }
+ useDisplayNameInQuit = getBoolean("settings.use-display-name-in-quit-message", useDisplayNameInQuit);
+ } + }
} }
diff --git a/src/main/java/io/papermc/paper/adventure/AdventureComponent.java b/src/main/java/io/papermc/paper/adventure/AdventureComponent.java diff --git a/src/main/java/io/papermc/paper/adventure/AdventureComponent.java b/src/main/java/io/papermc/paper/adventure/AdventureComponent.java

View file

@ -20,8 +20,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -0,0 +0,0 @@ public class PaperConfig { @@ -0,0 +0,0 @@ public class PaperConfig {
private static void useDisplayNameInQuit() { }
useDisplayNameInQuit = getBoolean("use-display-name-in-quit-message", useDisplayNameInQuit); useDisplayNameInQuit = getBoolean("settings.use-display-name-in-quit-message", useDisplayNameInQuit);
} }
+ +
+ public static boolean loadPermsBeforePlugins = true; + public static boolean loadPermsBeforePlugins = true;

View file

@ -364,8 +364,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ commands = new HashMap<String, Command>(); + commands = new HashMap<String, Command>();
+ commands.put("paper", new PaperCommand("paper")); + commands.put("paper", new PaperCommand("paper"));
+ +
+ version = getInt("config-version", 20); + version = getInt("config-version", 21);
+ set("config-version", 20); + set("config-version", 21);
+ readConfig(PaperConfig.class, null); + readConfig(PaperConfig.class, null);
+ } + }
+ +