Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Oct 3, 2024
1 parent b8df0a1 commit c69aea8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions patches/server/0006-Leaves-Server-Config-And-Command.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ index 0000000000000000000000000000000000000000..4b61fccc71d98a7b69bb7f88fb88ea0a
+}
diff --git a/src/main/java/org/leavesmc/leaves/command/subcommands/ConfigCommand.java b/src/main/java/org/leavesmc/leaves/command/subcommands/ConfigCommand.java
new file mode 100644
index 0000000000000000000000000000000000000000..ba3fc98fb860e21fd0f28ae9dd59f1257b739e56
index 0000000000000000000000000000000000000000..78471bde136d982f19f23beb3b121e4b254d124b
--- /dev/null
+++ b/src/main/java/org/leavesmc/leaves/command/subcommands/ConfigCommand.java
@@ -0,0 +1,83 @@
Expand Down Expand Up @@ -1395,13 +1395,13 @@ index 0000000000000000000000000000000000000000..ba3fc98fb860e21fd0f28ae9dd59f125
+ switch (args.length) {
+ case 1 -> {
+ List<String> list = new ArrayList<>(GlobalConfigManager.getVerifiedConfigPaths());
+ return LeavesCommandUtil.getListMatchingLast(sender, args, list, "bukkit.command.leaves.config.", "bukkit.command.leaves.config");
+ return LeavesCommandUtil.getListMatchingLast(sender, args, list);
+ }
+
+ case 2 -> {
+ GlobalConfigManager.VerifiedConfig verifiedConfig = GlobalConfigManager.getVerifiedConfig(args[0]);
+ if (verifiedConfig != null) {
+ return LeavesCommandUtil.getListMatchingLast(sender, args, verifiedConfig.verify().valueSuggest(), "", "bukkit.command.leaves.config");
+ return LeavesCommandUtil.getListMatchingLast(sender, args, verifiedConfig.verify().valueSuggest());
+ } else {
+ return Collections.singletonList("<ERROR CONFIG>");
+ }
Expand Down

0 comments on commit c69aea8

Please sign in to comment.