From 15da7067067a0786d221f2ad3cd060acd4dd3431 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 12 Aug 2018 09:41:00 +1000 Subject: [PATCH] SPIGOT-4258: Add Player.updateCommands method --- .../java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index c10816cfd2..a8b0bc4e1c 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()); + } }