mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
999c803091
ACF's permission tree can go more complex where a single root command may have multiple dependent perm nodes. So essentially ACF does not assign permission nodes to root in bukkit and the such in a reasonable manner. With this commit, we try to identify a single unique permission node, and assign that permission node as the node to use where applicable. In Bukkit/Sponge, we implement testPermission instead, which does a smarter look up of all potential commands that root command might execute for the given issuer, and if they have permission to any of them, then pass as true. This is much more accurate, so if the issuer has access to no subcommand then the root command should not be revealed anymore in Bukkit or Sponge. In bungee, we are best guess at the unique perm node, and if there is any ambiguity, it will be null and seen by everyone (but still enforces permission checks)