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.useMojangMappings(boolean useMojangMappings) Deprecated, for removal: This API element is subject to removal in a future version.Use the `commandapi-bukkit-shade-mojang-mapped` depdendency instead of `commandapi-bukkit-shade` if you want to use mojang mappings.Methods inherited from class dev.jorel.commandapi.CommandAPIConfig
addSkipSenderProxy, addSkipSenderProxy, 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
-
useMojangMappings
@Deprecated(since="9.4.1", forRemoval=true) public CommandAPIBukkitConfig useMojangMappings(boolean useMojangMappings) Deprecated, for removal: This API element is subject to removal in a future version.Use the `commandapi-bukkit-shade-mojang-mapped` depdendency instead of `commandapi-bukkit-shade` if you want to use mojang mappings.Sets whether the CommandAPI should use Mojang mappings as opposed to Spigot's mappings for internal calls. If set to true, the CommandAPI will use Mojang mappings.- Parameters:
useMojangMappings- whether the CommandAPI should use Mojang mappings for internal calls- Returns:
- this CommandAPIBukkitConfig
-
usePluginNamespace
- Specified by:
usePluginNamespacein classCommandAPIConfig<CommandAPIBukkitConfig>- Returns:
- this CommandAPIBukkitConfig
-
setNamespace
- Overrides:
setNamespacein classCommandAPIConfig<CommandAPIBukkitConfig>
-
instance
-