summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-08-12 09:41:00 +1000
committermd_5 <git@md-5.net>2018-08-12 09:41:00 +1000
commit15da7067067a0786d221f2ad3cd060acd4dd3431 (patch)
tree219557e696222db240629543e270649954a55fff /src
parentb47946ff193fc9e97777c8aed2507abce3427724 (diff)
downloadcraftbukkit-15da7067067a0786d221f2ad3cd060acd4dd3431.tar
craftbukkit-15da7067067a0786d221f2ad3cd060acd4dd3431.tar.gz
craftbukkit-15da7067067a0786d221f2ad3cd060acd4dd3431.tar.lz
craftbukkit-15da7067067a0786d221f2ad3cd060acd4dd3431.tar.xz
craftbukkit-15da7067067a0786d221f2ad3cd060acd4dd3431.zip
SPIGOT-4258: Add Player.updateCommands method
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c10816cf..a8b0bc4e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1618,4 +1618,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public String getLocale() {
return getHandle().locale;
}
+
+ @Override
+ public void updateCommands() {
+ if (getHandle().playerConnection == null) return;
+
+ getHandle().server.getCommandDispatcher().a(getHandle());
+ }
}