Package dev.jorel.commandapi
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 dev.jorel.commandapi.CommandAPIBukkit
config, nms, plugin -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCommandAPIPaper(InternalPaperConfig config, BundledNMS<Source> nms) -
Method Summary
Modifier and TypeMethodDescriptionfailWithAdventureComponent(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()voidonEnable()Enables the CommandAPI.voidonLoad()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, registerPermission, 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>
-
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>
-
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>
-