From 4dfabc26f83848e9e8fd6da1b99b2968593a9f1f Mon Sep 17 00:00:00 2001 From: William Date: Wed, 19 Jun 2024 12:29:01 +0100 Subject: [PATCH] feat: set usage text for Bukkit/legacy Paper commands --- .../main/java/net/william278/uniform/bukkit/BukkitCommand.java | 1 + gradle.properties | 2 +- .../java/net/william278/uniform/paper/LegacyPaperCommand.java | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bukkit/src/main/java/net/william278/uniform/bukkit/BukkitCommand.java b/bukkit/src/main/java/net/william278/uniform/bukkit/BukkitCommand.java index b014cd4..be8cc69 100644 --- a/bukkit/src/main/java/net/william278/uniform/bukkit/BukkitCommand.java +++ b/bukkit/src/main/java/net/william278/uniform/bukkit/BukkitCommand.java @@ -78,6 +78,7 @@ public class BukkitCommand extends BaseCommand { // Setup command properties this.setDescription(command.getDescription()); this.setAliases(command.getAliases()); + this.setUsage(command.build().getUsageText()); if (permission != null) { this.setPermission(permission.node()); } diff --git a/gradle.properties b/gradle.properties index 8c6a95c..5f884cb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,6 @@ javaVersion=17 org.gradle.jvmargs='-Dfile.encoding=UTF-8' org.gradle.daemon=true -library_version=1.1.6 +library_version=1.1.7 library_archive=uniform library_description=Cross-platform wrapper for making Brigadier commands, based on BrigadierWrapper by Tofaa2, itself inspired by emortalmcs command system. \ No newline at end of file diff --git a/paper/src/main/java/net/william278/uniform/paper/LegacyPaperCommand.java b/paper/src/main/java/net/william278/uniform/paper/LegacyPaperCommand.java index d39f55c..0f749bf 100644 --- a/paper/src/main/java/net/william278/uniform/paper/LegacyPaperCommand.java +++ b/paper/src/main/java/net/william278/uniform/paper/LegacyPaperCommand.java @@ -83,6 +83,7 @@ public class LegacyPaperCommand extends BaseCommand { // Setup command properties this.setDescription(command.getDescription()); this.setAliases(command.getAliases()); + this.setUsage(command.build().getUsageText()); if (permission != null) { this.setPermission(permission.node()); }