mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 11:15:19 +01:00
Refactored name of command builder, to specify it a little better
This commit is contained in:
parent
00c6b17f3e
commit
3b9b1b7b8a
@ -735,11 +735,11 @@ public class CommandDescription {
|
||||
this.permissions = new CommandPermissions(permissionNode, defaultPermission);
|
||||
}
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
public static CommandBuilder builder() {
|
||||
return new CommandBuilder();
|
||||
}
|
||||
|
||||
public static final class Builder {
|
||||
public static final class CommandBuilder {
|
||||
private List<String> labels;
|
||||
private String description;
|
||||
private String detailedDescription;
|
||||
@ -767,47 +767,47 @@ public class CommandDescription {
|
||||
);
|
||||
}
|
||||
|
||||
public Builder labels(List<String> labels) {
|
||||
public CommandBuilder labels(List<String> labels) {
|
||||
this.labels = labels;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder labels(String... labels) {
|
||||
public CommandBuilder labels(String... labels) {
|
||||
return labels(asMutableList(labels));
|
||||
}
|
||||
|
||||
public Builder description(String description) {
|
||||
public CommandBuilder description(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder detailedDescription(String detailedDescription) {
|
||||
public CommandBuilder detailedDescription(String detailedDescription) {
|
||||
this.detailedDescription = detailedDescription;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder executableCommand(ExecutableCommand executableCommand) {
|
||||
public CommandBuilder executableCommand(ExecutableCommand executableCommand) {
|
||||
this.executableCommand = executableCommand;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder parent(CommandDescription parent) {
|
||||
public CommandBuilder parent(CommandDescription parent) {
|
||||
this.parent = parent;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder withArgument(String label, String description, boolean isOptional) {
|
||||
public CommandBuilder withArgument(String label, String description, boolean isOptional) {
|
||||
arguments.add(new CommandArgumentDescription(label, description, isOptional));
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder noArgumentMaximum(boolean noArgumentMaximum) {
|
||||
public CommandBuilder noArgumentMaximum(boolean noArgumentMaximum) {
|
||||
this.noArgumentMaximum = noArgumentMaximum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder permissions(CommandPermissions.DefaultPermission defaultPermission,
|
||||
PermissionNode... permissionNodes) {
|
||||
public CommandBuilder permissions(CommandPermissions.DefaultPermission defaultPermission,
|
||||
PermissionNode... permissionNodes) {
|
||||
this.permissions = new CommandPermissions(asMutableList(permissionNodes), defaultPermission);
|
||||
return this;
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ public class HelpSyntaxHelperTest {
|
||||
}
|
||||
|
||||
|
||||
private static CommandDescription.Builder getDescriptionBuilder() {
|
||||
private static CommandDescription.CommandBuilder getDescriptionBuilder() {
|
||||
CommandDescription base = CommandDescription.builder()
|
||||
.labels("authme")
|
||||
.description("Base command")
|
||||
|
Loading…
Reference in New Issue
Block a user