summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/mojang
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-07-31 10:46:09 +1000
committermd_5 <git@md-5.net>2018-07-31 10:46:09 +1000
commit549d9b012078466bd36c6185fe6e1a4bcf311b8c (patch)
treea425ff3a649f7c39822bcbbdef1121c557bad908 /src/main/java/com/mojang
parent5cfa68387f8b4befb06c212cdc77c23e37855ff1 (diff)
downloadcraftbukkit-549d9b012078466bd36c6185fe6e1a4bcf311b8c.tar
craftbukkit-549d9b012078466bd36c6185fe6e1a4bcf311b8c.tar.gz
craftbukkit-549d9b012078466bd36c6185fe6e1a4bcf311b8c.tar.lz
craftbukkit-549d9b012078466bd36c6185fe6e1a4bcf311b8c.tar.xz
craftbukkit-549d9b012078466bd36c6185fe6e1a4bcf311b8c.zip
SPIGOT-4029: Add event for commands being sent to client
Diffstat (limited to 'src/main/java/com/mojang')
-rw-r--r--src/main/java/com/mojang/brigadier/tree/CommandNode.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/com/mojang/brigadier/tree/CommandNode.java b/src/main/java/com/mojang/brigadier/tree/CommandNode.java
index 1196df6b..98592a3e 100644
--- a/src/main/java/com/mojang/brigadier/tree/CommandNode.java
+++ b/src/main/java/com/mojang/brigadier/tree/CommandNode.java
@@ -34,6 +34,13 @@ public abstract class CommandNode<S> implements Comparable<CommandNode<S>> {
private final RedirectModifier<S> modifier;
private final boolean forks;
private Command<S> command;
+ // CraftBukkit start
+ public void removeCommand(String name) {
+ children.remove(name);
+ literals.remove(name);
+ arguments.remove(name);
+ }
+ // CraftBukkit end
protected CommandNode(final Command<S> command, final Predicate<S> requirement, final CommandNode<S> redirect, final RedirectModifier<S> modifier, final boolean forks) {
this.command = command;