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>
|
<version>2.2.2-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Jalu Injector -->
|
<!-- Jalu Injector -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ch.jalu</groupId>
|
<groupId>ch.jalu</groupId>
|
||||||
|
|||||||
@ -84,14 +84,14 @@ public final class CommandUtils {
|
|||||||
* @return formatted command syntax incl. arguments
|
* @return formatted command syntax incl. arguments
|
||||||
*/
|
*/
|
||||||
public static String buildSyntax(CommandDescription command, List<String> correctLabels) {
|
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) {
|
for (int i = 1; i < correctLabels.size(); ++i) {
|
||||||
commandSyntax += " " + correctLabels.get(i);
|
commandSyntax.append(" ").append(correctLabels.get(i));
|
||||||
}
|
}
|
||||||
for (CommandArgumentDescription argument : command.getArguments()) {
|
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