Skip to content

Commit

Permalink
Add more detailed explanation for configurable connection message config
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Jul 9, 2024
1 parent 6b3fcdb commit 691db27
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions patches/server/0074-Configurable-connection-message.patch
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ index b665969cf7232a4bbc060c91b1cf802df3b0c908..44b05a126360072f1966d7f0d2a822fd
}
diff --git a/src/main/java/org/dreeam/leaf/config/modules/misc/ConnectionMessage.java b/src/main/java/org/dreeam/leaf/config/modules/misc/ConnectionMessage.java
new file mode 100644
index 0000000000000000000000000000000000000000..fb6f2337e74ec2fcea5f51bcbe962201b488de44
index 0000000000000000000000000000000000000000..bb8173c7a307b980babf858f7b65aaeb70305ecf
--- /dev/null
+++ b/src/main/java/org/dreeam/leaf/config/modules/misc/ConnectionMessage.java
@@ -0,0 +1,27 @@
@@ -0,0 +1,31 @@
+package org.dreeam.leaf.config.modules.misc;
+
+import org.dreeam.leaf.config.ConfigModules;
Expand All @@ -97,12 +97,16 @@ index 0000000000000000000000000000000000000000..fb6f2337e74ec2fcea5f51bcbe962201
+
+ @Override
+ public void onLoaded() {
+ config.addComment(getBasePath(), """
+ Connection message using MiniMessage format, set to 'default' to use vanilla join message.
+ available placeholders:
+ %player_name% - player name
+ %player_displayname% - player display name""");
+
+ joinEnabled = config.getBoolean(getBasePath() + ".join.enabled", joinEnabled);
+ joinMessage = config.getString(getBasePath() + ".join.message", joinMessage,
+ "Join message of player, using MiniMessage format, set to 'default' to use vanilla join message.");
+ joinMessage = config.getString(getBasePath() + ".join.message", joinMessage, "Join message of player");
+
+ quitEnabled = config.getBoolean(getBasePath() + ".quit.enabled", quitEnabled);
+ quitMessage = config.getString(getBasePath() + ".quit.message", quitMessage,
+ "Quit message of player, using MiniMessage format set to 'default' to use vanilla quit message.");
+ quitMessage = config.getString(getBasePath() + ".quit.message", quitMessage, "Quit message of player");
+ }
+}

0 comments on commit 691db27

Please sign in to comment.