Package dev.jorel.commandapi
Class CommandAPISpigot<Source>
java.lang.Object
dev.jorel.commandapi.CommandAPIBukkit<Source>
dev.jorel.commandapi.CommandAPISpigot<Source>
- All Implemented Interfaces:
BukkitPlatform<Source>,CommandAPIPlatform<Argument<?>,,org.bukkit.command.CommandSender, Source> SpigotNMS<Source>
public abstract class CommandAPISpigot<Source>
extends CommandAPIBukkit<Source>
implements SpigotNMS<Source>
-
Field Summary
Fields inherited from class dev.jorel.commandapi.CommandAPIBukkit
config, nms, plugin -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfailWithBaseComponents(net.md_5.bungee.api.chat.BaseComponent... message) Forces a command to return a success value of 0org.bukkit.command.CommandMapstatic InternalSpigotConfigstatic <Source> CommandAPISpigot<Source> voidonEnable()Enables the CommandAPI.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, getLogger, getMessenger, getNMS, getPlugin, getSenderForCommand, getSuggestionProvider, initializeNBTAPI, newConcreteCommandAPICommand, newConcreteLiteralArgument, newConcreteMultiLiteralArgument, onDisable, onLoad, postCommandRegistration, preCommandRegistration, registerBukkitRecipesSafely, registerCommandNode, registerPermission, reloadDataPacks, setupMessenger, stopCommandRegistrations, unregister, unregister, updateRequirementsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.jorel.commandapi.BukkitPlatform
createCommandRegistrationStrategyMethods inherited from interface dev.jorel.commandapi.nms.SpigotNMS
bukkitNMS, getChat, getChatColor, getChatComponent, getProfile
-
Constructor Details
-
CommandAPISpigot
-
-
Method Details
-
getSpigot
-
getConfiguration
-
onEnable
public void onEnable()Enables the CommandAPI. This should be placed at the start of youronEnable()method.- Specified by:
onEnablein interfaceCommandAPIPlatform<Argument<?>,org.bukkit.command.CommandSender, Source>
-
getCommandMap
public org.bukkit.command.CommandMap getCommandMap()- Specified by:
getCommandMapin interfaceBukkitPlatform<Source>
-
activePlatform
- Specified by:
activePlatformin interfaceBukkitPlatform<Source>
-
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>
-
failWithBaseComponents
public static WrapperCommandSyntaxException failWithBaseComponents(net.md_5.bungee.api.chat.BaseComponent... message) Forces a command to return a success value of 0- Parameters:
message- Description of the error message, formatted as an array of base components- Returns:
- a
WrapperCommandSyntaxExceptionthat wraps Brigadier'sCommandSyntaxException
-