Class CommandAPIBukkitConfig

All Implemented Interfaces:
ChainableBuilder<CommandAPIBukkitConfig>

public class CommandAPIBukkitConfig extends CommandAPIConfig<CommandAPIBukkitConfig>
A class that contains information needed to configure the CommandAPI on Bukkit-based servers.
  • 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 - The JavaPlugin that is loading the CommandAPI This is used when registering events.
  • Method Details

    • shouldHookPaperReload

      public CommandAPIBukkitConfig shouldHookPaperReload(boolean hooked)
      Sets the CommandAPI to hook into Paper's ServerResourcesReloadedEvent when available if true. This helps CommandAPI commands to work in datapacks after /minecraft:reload is run.
      Parameters:
      hooked - whether the CommandAPI should hook into Paper's ServerResourcesReloadedEvent
      Returns:
      this CommandAPIBukkitConfig
    • skipReloadDatapacks

      public CommandAPIBukkitConfig skipReloadDatapacks(boolean skip)
      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 when shouldHookPaperReload(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

      public CommandAPIBukkitConfig usePluginNamespace()
      Specified by:
      usePluginNamespace in class CommandAPIConfig<CommandAPIBukkitConfig>
      Returns:
      this CommandAPIBukkitConfig
    • setNamespace

      public CommandAPIBukkitConfig setNamespace(String namespace)
      Overrides:
      setNamespace in class CommandAPIConfig<CommandAPIBukkitConfig>
    • instance

      public CommandAPIBukkitConfig instance()