Commands
This commit is contained in:
parent
e3c460e614
commit
d305fe6679
1
pom.xml
1
pom.xml
@ -660,6 +660,7 @@
|
||||
<version>2.2.2-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Jalu Injector -->
|
||||
<dependency>
|
||||
<groupId>ch.jalu</groupId>
|
||||
|
||||
@ -84,14 +84,14 @@ public final class CommandUtils {
|
||||
* @return formatted command syntax incl. arguments
|
||||
*/
|
||||
public static String buildSyntax(CommandDescription command, List<String> correctLabels) {
|
||||
String commandSyntax = ChatColor.WHITE + "/" + correctLabels.get(0) + ChatColor.YELLOW;
|
||||
StringBuilder commandSyntax = new StringBuilder(ChatColor.WHITE + "/" + correctLabels.get(0) + ChatColor.YELLOW);
|
||||
for (int i = 1; i < correctLabels.size(); ++i) {
|
||||
commandSyntax += " " + correctLabels.get(i);
|
||||
commandSyntax.append(" ").append(correctLabels.get(i));
|
||||
}
|
||||
for (CommandArgumentDescription argument : command.getArguments()) {
|
||||
commandSyntax += " " + formatArgument(argument);
|
||||
commandSyntax.append(" ").append(formatArgument(argument));
|
||||
}
|
||||
return commandSyntax;
|
||||
return commandSyntax.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user