fix(bukkit): only update commands if the method exists
This commit is contained in:
parent
de22d70669
commit
2dfbefdd7a
1 changed files with 4 additions and 2 deletions
|
|
@ -165,8 +165,10 @@ public class BukkitPluginRegistrationHandler<C> implements CommandRegistrationHa
|
||||||
|
|
||||||
this.registeredCommands.remove(rootCommand);
|
this.registeredCommands.remove(rootCommand);
|
||||||
|
|
||||||
// Once the command has been unregistered, we need to refresh the command list for all online players.
|
if (this.bukkitCommandManager.hasCapability(CloudBukkitCapabilities.BRIGADIER)) {
|
||||||
Bukkit.getOnlinePlayers().forEach(Player::updateCommands);
|
// Once the command has been unregistered, we need to refresh the command list for all online players.
|
||||||
|
Bukkit.getOnlinePlayers().forEach(Player::updateCommands);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private @NonNull String getNamespacedLabel(final @NonNull String label) {
|
private @NonNull String getNamespacedLabel(final @NonNull String label) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue