Package dev.jorel.commandapi
Class CommandAPIBukkitConfig
java.lang.Object
dev.jorel.commandapi.CommandAPIConfig<CommandAPIBukkitConfig>
dev.jorel.commandapi.CommandAPIBukkitConfig
- All Implemented Interfaces:
ChainableBuilder<CommandAPIBukkitConfig>
A class that contains information needed to configure the CommandAPI on Bukkit-based servers.
-
Constructor Summary
ConstructorsConstructorDescriptionCommandAPIBukkitConfig(org.bukkit.plugin.java.JavaPlugin plugin) Creates a new CommandAPIBukkitConfig object. -
Method Summary
Modifier and TypeMethodDescriptioninstance()setNamespace(String namespace) shouldHookPaperReload(boolean hooked) Sets the CommandAPI to hook into Paper'sServerResourcesReloadedEventwhen available if true.skipReloadDatapacks(boolean skip) Sets whether the CommandAPI should skip its datapack reload step after the server has finished loading.Deprecated, for removal: This API element is subject to removal in a future version.The plugin namespace is now the default namespaceMethods inherited from class dev.jorel.commandapi.CommandAPIConfig
addSkipSenderProxy, addSkipSenderProxy, beLenientForMinorVersions, dispatcherFile, initializeNBTAPI, missingExecutorImplementationMessage, silentLogs, useLatestNMSVersion, verboseOutput
-
Constructor Details
-
CommandAPIBukkitConfig
public CommandAPIBukkitConfig(org.bukkit.plugin.java.JavaPlugin plugin) Creates a new CommandAPIBukkitConfig object. Variables in this constructor are required to load the CommandAPI on Bukkit properly.- Parameters:
plugin- TheJavaPluginthat is loading the CommandAPI This is used when registering events.
-
-
Method Details
-
shouldHookPaperReload
Sets the CommandAPI to hook into Paper'sServerResourcesReloadedEventwhen available if true. This helps CommandAPI commands to work in datapacks after/minecraft:reloadis run.- Parameters:
hooked- whether the CommandAPI should hook into Paper'sServerResourcesReloadedEvent- Returns:
- this CommandAPIBukkitConfig
-
skipReloadDatapacks
Sets whether the CommandAPI should skip its datapack reload step after the server has finished loading. This does not skip reloading of datapacks when invoked manually whenshouldHookPaperReload(boolean)is set.- Parameters:
skip- whether the CommandAPI should skip reloading datapacks when the server has finished loading- Returns:
- this CommandAPIBukkitConfig
-
usePluginNamespace
Deprecated, for removal: This API element is subject to removal in a future version.The plugin namespace is now the default namespace- Specified by:
usePluginNamespacein classCommandAPIConfig<CommandAPIBukkitConfig>- Returns:
- this CommandAPIBukkitConfig
-
setNamespace
- Overrides:
setNamespacein classCommandAPIConfig<CommandAPIBukkitConfig>
-
instance
-