CommandAPI 9.5.2
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.PaperCommandRegistration< Source > Class Template Reference

Handles logic for registering commands after Paper build 65, where https://github.com/PaperMC/Paper/pull/8235 changed a bunch of the behind-the-scenes logic. More...

+ Inheritance diagram for dev.jorel.commandapi.PaperCommandRegistration< Source >:

Public Member Functions

 PaperCommandRegistration (Supplier< CommandDispatcher< Source > > getBrigadierDispatcher, Predicate< CommandNode< Source > > isBukkitCommand)
 
boolean isBukkitCommand (CommandNode< Source > node)
 Checks if a Brigadier command node came from wrapping a Bukkit command. More...
 
CommandDispatcher< Source > getBrigadierDispatcher ()
 
void runTasksAfterServerStart ()
 
void postCommandRegistration (RegisteredCommand registeredCommand, LiteralCommandNode< Source > resultantNode, List< LiteralCommandNode< Source > > aliasNodes)
 
LiteralCommandNode< Source > registerCommandNode (LiteralArgumentBuilder< Source > node, String namespace)
 
void unregister (String commandName, boolean unregisterNamespaces, boolean unregisterBukkit)
 
void preReloadDataPacks ()
 

Protected Member Functions

void removeBrigadierCommands (RootCommandNode< Source > root, String commandName, boolean unregisterNamespaces, Predicate< CommandNode< Source > > extraCheck)
 

Static Protected Member Functions

static< T > void removeCommandNamespace (Map< String, T > map, String commandName, Predicate< T > extraCheck)
 
static< T > void removeCommandFromMapIfCheckPasses (Map< String, T > map, String key, Predicate< T > extraCheck)
 
static boolean isThisTheCommandButNamespaced (String commandName, String key)
 

Detailed Description

Handles logic for registering commands after Paper build 65, where https://github.com/PaperMC/Paper/pull/8235 changed a bunch of the behind-the-scenes logic.

Member Function Documentation

◆ getBrigadierDispatcher()

◆ isBukkitCommand()

boolean dev.jorel.commandapi.PaperCommandRegistration< Source >.isBukkitCommand ( CommandNode< Source >  node)

Checks if a Brigadier command node came from wrapping a Bukkit command.

Parameters
nodeThe CommandNode to check
Returns
true if the CommandNode is being handled by Paper's BukkitCommandNode

◆ postCommandRegistration()

void dev.jorel.commandapi.PaperCommandRegistration< Source >.postCommandRegistration ( RegisteredCommand  registeredCommand,
LiteralCommandNode< Source >  resultantNode,
List< LiteralCommandNode< Source > >  aliasNodes 
)

◆ preReloadDataPacks()

◆ registerCommandNode()

LiteralCommandNode< Source > dev.jorel.commandapi.PaperCommandRegistration< Source >.registerCommandNode ( LiteralArgumentBuilder< Source >  node,
String  namespace 
)

◆ runTasksAfterServerStart()

◆ unregister()

void dev.jorel.commandapi.PaperCommandRegistration< Source >.unregister ( String  commandName,
boolean  unregisterNamespaces,
boolean  unregisterBukkit 
)