mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 05:32:18 -07:00
Brigadier Mojang API
Adds AsyncPlayerSendCommandsEvent - Allows modifying on a per command basis what command data they see. Adds CommandRegisteredEvent - Allows manipulating the CommandNode to add more children/metadata for the client
This commit is contained in:
@@ -16,10 +16,11 @@
|
||||
|
||||
public abstract class CommandNode<S> implements Comparable<CommandNode<S>> {
|
||||
private final Map<String, CommandNode<S>> children = new LinkedHashMap<>();
|
||||
@@ -32,6 +34,13 @@
|
||||
@@ -32,6 +34,14 @@
|
||||
private final RedirectModifier<S> modifier;
|
||||
private final boolean forks;
|
||||
private Command<S> command;
|
||||
+ public CommandNode<CommandSourceStack> clientNode; // Paper - Brigadier API
|
||||
+ // CraftBukkit start
|
||||
+ public void removeCommand(String name) {
|
||||
+ this.children.remove(name);
|
||||
@@ -30,7 +31,7 @@
|
||||
|
||||
protected CommandNode(final Command<S> command, final Predicate<S> requirement, final CommandNode<S> redirect, final RedirectModifier<S> modifier, final boolean forks) {
|
||||
this.command = command;
|
||||
@@ -61,7 +70,17 @@
|
||||
@@ -61,7 +71,17 @@
|
||||
return this.modifier;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user