CommandAPI 9.6.0
An API for the command UI introduced in Minecraft 1.13
|
A class to contain information about how to configure the CommandAPI during its loading step. More...
Public Member Functions | |
Impl | verboseOutput (boolean value) |
Sets verbose output logging for the CommandAPI if true. More... | |
Impl | silentLogs (boolean value) |
Silences all logs (including warnings, but not errors) for the CommandAPI if true. More... | |
Impl | useLatestNMSVersion (boolean value) |
Sets whether the CommandAPI should run the latest available version of NMS support, regardless of Minecraft version. More... | |
Impl | beLenientForMinorVersions (boolean value) |
Sets whether the CommandAPI should load a (potentially unsupported) NMS version when updating to a minor release of Minecraft. More... | |
Impl | missingExecutorImplementationMessage (String value) |
Sets the message to display to users when a command has no executor. More... | |
Impl | dispatcherFile (File file) |
Specifies the location for the CommandAPI to store the internal representation of Brigadier's command tree. More... | |
Impl | addSkipSenderProxy (String... names) |
Impl | addSkipSenderProxy (List< String > names) |
Impl | setNamespace (String namespace) |
Sets the default namespace to use when register commands. More... | |
abstract Impl | usePluginNamespace () |
Sets whether the CommandAPI should use the plugin's name as the default namespace. More... | |
Impl | instance () |
Returns the instance of this class with the class Impl. More... | |
A class to contain information about how to configure the CommandAPI during its loading step.
You shouldn't use this class directly. Instead, use an appropriate subclass that corresponds to the platform you are developing for.
Impl dev.jorel.commandapi.CommandAPIConfig< Impl >.beLenientForMinorVersions | ( | boolean | value | ) |
Sets whether the CommandAPI should load a (potentially unsupported) NMS version when updating to a minor release of Minecraft.
As an example, this setting can allow updating to 1.21.2 from 1.21.1 but doesn't allow updating to 1.22 from 1.21.2. Unlike useLatestNMSVersion(boolean)
, this setting does not blindly load the latest NMS version, but will prefer loading the correct NMS implementation when available.
value | whether the CommandAPI should assume that minor Minecraft releases do not cause incompatibilities |
Impl dev.jorel.commandapi.CommandAPIConfig< Impl >.dispatcherFile | ( | File | file | ) |
Specifies the location for the CommandAPI to store the internal representation of Brigadier's command tree.
file | a file pointing to where to store Brigadier's JSON command dispatcher, for example new File(getDataFolder(), "command_registration.json") . If this argument is null , this file will not be created. |
|
inherited |
Returns the instance of this class with the class Impl.
Used for chaining builder methods.
Implemented in dev.jorel.commandapi.arguments.Argument< T >.
Impl dev.jorel.commandapi.CommandAPIConfig< Impl >.missingExecutorImplementationMessage | ( | String | value | ) |
Sets the message to display to users when a command has no executor.
Available formatting parameters are:
value | the message to display when a command has no executor |
Impl dev.jorel.commandapi.CommandAPIConfig< Impl >.setNamespace | ( | String | namespace | ) |
Sets the default namespace to use when register commands.
namespace | the namespace to use when register commands |
Impl dev.jorel.commandapi.CommandAPIConfig< Impl >.silentLogs | ( | boolean | value | ) |
Silences all logs (including warnings, but not errors) for the CommandAPI if true.
value | whether logging suppression should be enabled |
Impl dev.jorel.commandapi.CommandAPIConfig< Impl >.useLatestNMSVersion | ( | boolean | value | ) |
Sets whether the CommandAPI should run the latest available version of NMS support, regardless of Minecraft version.
This may produce unexpected results if the latest NMS version is not supported by the CommandAPI. This can be used to potentially provide compatibility with future Minecraft versions before the CommandAPI pushes a release to support it.
value | whether the latest version of NMS should be used |
|
abstract |
Sets whether the CommandAPI should use the plugin's name as the default namespace.
If called, any call to CommandAPIConfig#setNamespace(String)
will be ignored
Impl dev.jorel.commandapi.CommandAPIConfig< Impl >.verboseOutput | ( | boolean | value | ) |
Sets verbose output logging for the CommandAPI if true.
value | whether verbose output should be enabled |