fix: bind command and perm on Paper, close #737

This commit is contained in:
William278 committed 2025-02-01 13:54:54 +00:00
1 parent 0f04429ea1
commit 5721b730d7
1 file changed
+3
@@ -38,6 +38,8 @@ public class BukkitCommand extends org.bukkit.command.Command {
public BukkitCommand(@NotNull Command command, @NotNull BukkitHuskHomes plugin) { public BukkitCommand(@NotNull Command command, @NotNull BukkitHuskHomes plugin) {
super(command.getName(), command.getDescription(), command.getUsage(), command.getAliases()); super(command.getName(), command.getDescription(), command.getUsage(), command.getAliases());
this.setPermission(command.getPermission());
this.command = command; this.command = command;
this.plugin = plugin; this.plugin = plugin;
} }
@@ -71,6 +73,7 @@ public class BukkitCommand extends org.bukkit.command.Command {
command.getUsage(), command.getUsage(),
BukkitCommand.getPermissionDefault(command.isOperatorCommand()) BukkitCommand.getPermissionDefault(command.isOperatorCommand())
); );
this.setPermission(command.getPermission());
final List<Permission> childNodes = command.getAdditionalPermissions() final List<Permission> childNodes = command.getAdditionalPermissions()
.entrySet().stream() .entrySet().stream()
.map((entry) -> BukkitCommand.addPermission( .map((entry) -> BukkitCommand.addPermission(