Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0d0cce9

Browse files
committed
Use Player#updateCommands instead of resendPackets
Rebased CommandAPI#471 into runtime registering (CommandAPI#417)
1 parent 6d01d57 commit 0d0cce9

File tree

1 file changed

+2
-2
lines changed
  • commandapi-platforms/commandapi-bukkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi

1 file changed

+2
-2
lines changed

commandapi-platforms/commandapi-bukkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/CommandAPIBukkit.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ public void postCommandRegistration(RegisteredCommand registeredCommand, Literal
463463

464464
// Sending command dispatcher packets usually happens when Players join the server
465465
for(Player p: Bukkit.getOnlinePlayers()) {
466-
resendPackets(p);
466+
p.updateCommands();
467467
}
468468
}
469469
}
@@ -514,7 +514,7 @@ public void unregister(String commandName, boolean force) {
514514
getHelpMap().remove("/" + commandName);
515515

516516
for (Player p : Bukkit.getOnlinePlayers()) {
517-
resendPackets(p);
517+
p.updateCommands();
518518
}
519519
}
520520
}

0 commit comments

Comments
 (0)