Class CommandAPIPaper<Source>

java.lang.Object
dev.jorel.commandapi.CommandAPIBukkit<Source>
dev.jorel.commandapi.CommandAPIPaper<Source>
All Implemented Interfaces:
dev.jorel.commandapi.BukkitPlatform<Source>, dev.jorel.commandapi.CommandAPIPlatform<dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender, Source>

public class CommandAPIPaper<Source> extends dev.jorel.commandapi.CommandAPIBukkit<Source>
  • Field Summary

    Fields inherited from class dev.jorel.commandapi.CommandAPIBukkit

    config, nms, plugin
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    dev.jorel.commandapi.Platform
     
    <Impl extends dev.jorel.commandapi.AbstractCommandAPICommand<Impl, dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender>>
    boolean
    checkRegistrationStatus(dev.jorel.commandapi.AbstractCommandAPICommand<Impl, dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender> command)
     
    dev.jorel.commandapi.CommandRegistrationStrategy<Source>
     
    static dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException
    failWithAdventureComponent(net.kyori.adventure.text.ComponentLike message)
    Forces a command to return a success value of 0
    org.bukkit.command.CommandMap
     
     
    io.papermc.paper.plugin.lifecycle.event.LifecycleEventOwner
     
    dev.jorel.commandapi.CommandAPILogger
     
     
    static <Source> CommandAPIPaper<Source>
     
     
    boolean
     
    void
    Enables the CommandAPI.
    void
     
    void
     
    dev.jorel.commandapi.commandsenders.BukkitCommandSender<? extends org.bukkit.command.CommandSender>
    wrapCommandSender(org.bukkit.command.CommandSender sender)
     

    Methods inherited from class dev.jorel.commandapi.CommandAPIBukkit

    checkDependencies, createDispatcherFile, get, getBrigadierDispatcher, getBrigadierSourceFromCommandSender, getCommandRegistrationStrategy, getCommandSenderFromCommandSource, getMessenger, getPlugin, getSenderForCommand, getSuggestionProvider, initializeNBTAPI, newConcreteCommandAPICommand, newConcreteLiteralArgument, newConcreteMultiLiteralArgument, onDisable, postCommandRegistration, preCommandRegistration, registerBukkitRecipesSafely, registerCommandNode, reloadDataPacks, setupMessenger, stopCommandRegistrations, unregister, unregister, updateRequirements

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getPaper

      public static <Source> CommandAPIPaper<Source> getPaper()
    • getConfiguration

      public static InternalPaperConfig getConfiguration()
    • getPaperCommandRegistrationStrategy

      public PaperCommandRegistration<Source> getPaperCommandRegistrationStrategy()
    • getLifecycleEventOwner

      public io.papermc.paper.plugin.lifecycle.event.LifecycleEventOwner getLifecycleEventOwner()
    • getNMS

      public BundledNMS<Source> getNMS()
      Overrides:
      getNMS in class dev.jorel.commandapi.CommandAPIBukkit<Source>
    • isFoliaPresent

      public boolean isFoliaPresent()
    • onLoad

      public void onLoad()
      Specified by:
      onLoad in interface dev.jorel.commandapi.BukkitPlatform<Source>
      Specified by:
      onLoad in interface dev.jorel.commandapi.CommandAPIPlatform<dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender, Source>
      Overrides:
      onLoad in class dev.jorel.commandapi.CommandAPIBukkit<Source>
    • onEnable

      public void onEnable()
      Enables the CommandAPI. This should be placed at the start of your onEnable() method.
    • getCommandMap

      public org.bukkit.command.CommandMap getCommandMap()
    • activePlatform

      public dev.jorel.commandapi.Platform activePlatform()
    • createCommandRegistrationStrategy

      public dev.jorel.commandapi.CommandRegistrationStrategy<Source> createCommandRegistrationStrategy()
    • wrapCommandSender

      public dev.jorel.commandapi.commandsenders.BukkitCommandSender<? extends org.bukkit.command.CommandSender> wrapCommandSender(org.bukkit.command.CommandSender sender)
      Specified by:
      wrapCommandSender in interface dev.jorel.commandapi.BukkitPlatform<Source>
      Specified by:
      wrapCommandSender in interface dev.jorel.commandapi.CommandAPIPlatform<dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender, Source>
      Specified by:
      wrapCommandSender in class dev.jorel.commandapi.CommandAPIBukkit<Source>
    • registerPermission

      public void registerPermission(String string)
      Specified by:
      registerPermission in interface dev.jorel.commandapi.CommandAPIPlatform<dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender, Source>
      Specified by:
      registerPermission in class dev.jorel.commandapi.CommandAPIBukkit<Source>
    • checkRegistrationStatus

      @Internal public <Impl extends dev.jorel.commandapi.AbstractCommandAPICommand<Impl, dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender>> boolean checkRegistrationStatus(dev.jorel.commandapi.AbstractCommandAPICommand<Impl, dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender> command)
    • failWithAdventureComponent

      public static dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException failWithAdventureComponent(net.kyori.adventure.text.ComponentLike message)
      Forces a command to return a success value of 0
      Parameters:
      message - Description of the error message, formatted as an adventure chat component
      Returns:
      a WrapperCommandSyntaxException that wraps Brigadier's CommandSyntaxException
    • getLogger

      public dev.jorel.commandapi.CommandAPILogger getLogger()
      Specified by:
      getLogger in interface dev.jorel.commandapi.CommandAPIPlatform<dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender, Source>
      Overrides:
      getLogger in class dev.jorel.commandapi.CommandAPIBukkit<Source>