Interface PlexCommand
- All Known Implementing Classes:
SimplePlexCommand
public interface PlexCommand
Public Brigadier command contract for Plex and Plex modules.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidSupplies the running Plex API to commands that need API helpers.default voidbindModule(PlexModule module) Supplies the owning module to commands that need module-owned resources.com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> Builds the Brigadier command tree for this command.Returns the command definition.Returns command aliases as a trimmed list.default StringReturns the command description.default StringgetName()Returns the primary command name.default StringReturns the permission node required to use the command.default RequiredCommandSourceReturns the command source required to run the command.default StringgetUsage()Returns command usage text.static org.bukkit.entity.PlayerresolveOnlinePlayer(String name)
-
Method Details
-
commandSpec
-
resolveOnlinePlayer
-
buildCommand
com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> buildCommand()Builds the Brigadier command tree for this command.- Returns:
- root literal command node
-
bindApi
Supplies the running Plex API to commands that need API helpers.The default implementation does not store the API.
- Parameters:
api- running Plex API
-
bindModule
Supplies the owning module to commands that need module-owned resources.- Parameters:
module- owning module
-
getName
-
getDescription
-
getUsage
Returns command usage text.- Returns:
- command usage text with
<command>replaced by the command name
-
getPermission
Returns the permission node required to use the command.- Returns:
- permission node required to use the command
-
getRequiredSource
Returns the command source required to run the command.- Returns:
- command source required to run the command
-
getAliases
-