fix naming
This commit is contained in:
parent
d86c307166
commit
df94601816
@ -8,19 +8,19 @@ import net.tomatentum.marinara.interaction.commands.annotation.SlashCommand;
|
|||||||
|
|
||||||
public class SlashCommandDefinition {
|
public class SlashCommandDefinition {
|
||||||
private List<ExecutableSlashCommandDefinition> executableDefinitons;
|
private List<ExecutableSlashCommandDefinition> executableDefinitons;
|
||||||
private SlashCommand applicationCommand;
|
private SlashCommand slashCommand;
|
||||||
private boolean isRootCommand = false;
|
private boolean isRootCommand = false;
|
||||||
|
|
||||||
public SlashCommandDefinition(SlashCommand applicationCommand) {
|
public SlashCommandDefinition(SlashCommand applicationCommand) {
|
||||||
this.executableDefinitons = new ArrayList<>();
|
this.executableDefinitons = new ArrayList<>();
|
||||||
this.applicationCommand = applicationCommand;
|
this.slashCommand = applicationCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SlashCommandDefinition addExecutableCommand(ExecutableSlashCommandDefinition def) {
|
public SlashCommandDefinition addExecutableCommand(ExecutableSlashCommandDefinition def) {
|
||||||
if (def.applicationCommand() != null) {
|
if (def.applicationCommand() != null) {
|
||||||
if (applicationCommand == null)
|
if (slashCommand == null)
|
||||||
this.applicationCommand = def.applicationCommand();
|
this.slashCommand = def.applicationCommand();
|
||||||
if (!this.applicationCommand.equals(def.applicationCommand()))
|
if (!this.slashCommand.equals(def.applicationCommand()))
|
||||||
throw new IllegalArgumentException(def + ": has a non matching Application Command description. Please edit it to equal all other descriptions or remove it to use other definitions descriptions");
|
throw new IllegalArgumentException(def + ": has a non matching Application Command description. Please edit it to equal all other descriptions or remove it to use other definitions descriptions");
|
||||||
}
|
}
|
||||||
if (isRootCommand) {
|
if (isRootCommand) {
|
||||||
@ -37,8 +37,8 @@ public class SlashCommandDefinition {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SlashCommand getApplicationCommand() {
|
public SlashCommand getSlashCommand() {
|
||||||
return applicationCommand;
|
return slashCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExecutableSlashCommandDefinition[] getExecutableDefinitons() {
|
public ExecutableSlashCommandDefinition[] getExecutableDefinitons() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user