public class InitOptions extends Object
CommandCore. Cannot be created directly, and must use a Builder to create one.InitOptions.Builder| Modifier and Type | Class and Description |
|---|---|
static class |
InitOptions.Builder
Builder class to create an
InitOptions object |
static class |
InitOptions.Warning
A collection of possible errors when making command creation
|
| Constructor and Description |
|---|
InitOptions(@NotNull InitOptions.Builder builder)
Creates an
InitOptions from a Builder |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createHelpCommand()
Gets whether a help command should be generated or not
|
@UnmodifiableView List<String> |
getAliases()
Gets all the command's aliases
|
@Nullable String |
getPluginName()
Gets the custom plugin name
|
String |
getRootCommand()
Gets the root command
|
boolean |
hasCustomPluginName()
Gets whether the user has defined a custom plugin name or not
|
@UnmodifiableView boolean |
shouldWarn(@NotNull InitOptions.Warning warning)
Gets whether it should warn the user on a specific warning or not
|
void |
warnIf(@NotNull InitOptions.Warning warning,
boolean condition,
Object... args)
Warns a specific warning if a condition is met and
shouldWarn(warning) returns true |
@Contract(pure=true)
public InitOptions(@NotNull
@NotNull InitOptions.Builder builder)
InitOptions from a Builderbuilder - The builderpublic String getRootCommand()
public boolean hasCustomPluginName()
true if there is a custom plugin name, false otherwise@Nullable public @Nullable String getPluginName()
public @UnmodifiableView List<String> getAliases()
public @UnmodifiableView boolean shouldWarn(@NotNull
@NotNull InitOptions.Warning warning)
warning - The warning to check fortrue if it should warn, false otherwisepublic void warnIf(@NotNull
@NotNull InitOptions.Warning warning,
boolean condition,
Object... args)
shouldWarn(warning) returns truewarning - The warning to warncondition - The condition to meet in order to warnargs - The args used to format the warning messagepublic boolean createHelpCommand()
true if a help command should be generated, false otherwiseCopyright © 2024. All rights reserved.