Class CommandAPIPaper<Source>
java.lang.Object
dev.jorel.commandapi.CommandAPIBukkit<Source>
dev.jorel.commandapi.CommandAPIPaper<Source>
- All Implemented Interfaces:
BukkitPlatform<Source>, CommandAPIPlatform<Argument<?>, org.bukkit.command.CommandSender, Source>
-
Field Summary
Fields inherited from class CommandAPIBukkit
config, nms, plugin -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCommandAPIPaper(InternalPaperConfig config, BundledNMS<Source> nms) -
Method Summary
Modifier and TypeMethodDescription<Impl extends AbstractCommandAPICommand<Impl, Argument<?>, org.bukkit.command.CommandSender>>
booleancheckRegistrationStatus(AbstractCommandAPICommand<Impl, Argument<?>, org.bukkit.command.CommandSender> command) failWithAdventureComponent(net.kyori.adventure.text.ComponentLike message) Forces a command to return a success value of 0org.bukkit.command.CommandMapstatic InternalPaperConfigio.papermc.paper.plugin.lifecycle.event.LifecycleEventOwnergetNMS()static <Source> CommandAPIPaper<Source> getPaper()booleanvoidonEnable()Enables the CommandAPI.voidonLoad()voidregisterPermission(String string) BukkitCommandSender<? extends org.bukkit.command.CommandSender> wrapCommandSender(org.bukkit.command.CommandSender sender) Methods inherited from class 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
-
Constructor Details
-
CommandAPIPaper
-
-
Method Details
-
getPaper
-
getConfiguration
-
getLifecycleEventOwner
public io.papermc.paper.plugin.lifecycle.event.LifecycleEventOwner getLifecycleEventOwner() -
getNMS
- Overrides:
getNMSin classCommandAPIBukkit<Source>
-
isFoliaPresent
public boolean isFoliaPresent() -
onLoad
public void onLoad()- Specified by:
onLoadin interfaceBukkitPlatform<Source>- Specified by:
onLoadin interfaceCommandAPIPlatform<Argument<?>, org.bukkit.command.CommandSender, Source>- Overrides:
onLoadin classCommandAPIBukkit<Source>
-
onEnable
public void onEnable()Enables the CommandAPI. This should be placed at the start of youronEnable()method. -
getCommandMap
public org.bukkit.command.CommandMap getCommandMap() -
activePlatform
-
createCommandRegistrationStrategy
-
wrapCommandSender
public BukkitCommandSender<? extends org.bukkit.command.CommandSender> wrapCommandSender(org.bukkit.command.CommandSender sender) - Specified by:
wrapCommandSenderin interfaceBukkitPlatform<Source>- Specified by:
wrapCommandSenderin interfaceCommandAPIPlatform<Argument<?>, org.bukkit.command.CommandSender, Source>- Specified by:
wrapCommandSenderin classCommandAPIBukkit<Source>
-
registerPermission
- Specified by:
registerPermissionin interfaceCommandAPIPlatform<Argument<?>, org.bukkit.command.CommandSender, Source>- Specified by:
registerPermissionin classCommandAPIBukkit<Source>
-
checkRegistrationStatus
@Internal public <Impl extends AbstractCommandAPICommand<Impl, Argument<?>, org.bukkit.command.CommandSender>> boolean checkRegistrationStatus(AbstractCommandAPICommand<Impl, Argument<?>, org.bukkit.command.CommandSender> command) -
failWithAdventureComponent
public static 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
WrapperCommandSyntaxExceptionthat wraps Brigadier'sCommandSyntaxException
-
getLogger
- Specified by:
getLoggerin interfaceCommandAPIPlatform<Argument<?>, org.bukkit.command.CommandSender, Source>- Overrides:
getLoggerin classCommandAPIBukkit<Source>
-