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
ConstructorsModifierConstructorDescriptionprotectedCommandAPIPaper(InternalPaperConfig config, BundledNMS<Source> nms) -
Method Summary
Modifier and TypeMethodDescriptiondev.jorel.commandapi.Platform<Impl extends dev.jorel.commandapi.AbstractCommandAPICommand<Impl, dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender>>
booleancheckRegistrationStatus(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.WrapperCommandSyntaxExceptionfailWithAdventureComponent(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.LifecycleEventOwnerdev.jorel.commandapi.CommandAPILoggergetNMS()static <Source> CommandAPIPaper<Source> getPaper()booleanvoidonEnable()Enables the CommandAPI.voidonLoad()voidregisterPermission(String string) 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
-
Constructor Details
-
CommandAPIPaper
-
-
Method Details
-
getPaper
-
getConfiguration
-
getPaperCommandRegistrationStrategy
-
getLifecycleEventOwner
public io.papermc.paper.plugin.lifecycle.event.LifecycleEventOwner getLifecycleEventOwner() -
getNMS
- Overrides:
getNMSin classdev.jorel.commandapi.CommandAPIBukkit<Source>
-
isFoliaPresent
public boolean isFoliaPresent() -
onLoad
public void onLoad()- Specified by:
onLoadin interfacedev.jorel.commandapi.BukkitPlatform<Source>- Specified by:
onLoadin interfacedev.jorel.commandapi.CommandAPIPlatform<dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender, Source>- Overrides:
onLoadin classdev.jorel.commandapi.CommandAPIBukkit<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
public dev.jorel.commandapi.Platform activePlatform() -
createCommandRegistrationStrategy
-
wrapCommandSender
public dev.jorel.commandapi.commandsenders.BukkitCommandSender<? extends org.bukkit.command.CommandSender> wrapCommandSender(org.bukkit.command.CommandSender sender) - Specified by:
wrapCommandSenderin interfacedev.jorel.commandapi.BukkitPlatform<Source>- Specified by:
wrapCommandSenderin interfacedev.jorel.commandapi.CommandAPIPlatform<dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender, Source>- Specified by:
wrapCommandSenderin classdev.jorel.commandapi.CommandAPIBukkit<Source>
-
registerPermission
-
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
WrapperCommandSyntaxExceptionthat wraps Brigadier'sCommandSyntaxException
-
getLogger
-