访问控制检查
根据提供的字符串进行检查,以查看执行命令的用户是否拥有该权限。它旨在帮助受影响的玩家在游戏中调试权限问题。当玩家反复声称自己缺少某项权限并要求更新其配置时,此功能也有助于证明特定用户确实拥有(或不拥有)特定的权限。
语法:
/acc permission.node
示例:/acc permissions.build
/acc amchat.radio.personal.*
/acc amchat.radio.fixed.*
/acc amchat.radio.override.*
返回结果:
[ACC]: permissions.build - true
[ACC]: amchat.radio.personal.* - true
[ACC]: amchat.radio.fixed.* - false
[ACC]: amchat.radio.override.* - false
这表明我目前无法使用 AMChat 插件的“fixed”广播功能,我也没有覆盖权限组。
本插件是按用户配置的,因此如果你想测试多个权限组,你需要多个用户,或者至少需要一个管理员用户来将他们移动到其他组中。
如果你从权限文件中直接复制的内容返回了 false,问题可能出在格式不正确的 yml 文件上。
请检查你的 yml 文件,确保没有误输入空格,并在控制台查看是否有错误信息。当结果显示为 True 但在游戏中无效时,通常是由于插件本身有问题或存在插件冲突。
源码:ACC.java 我创建这个工具是为了帮助排查权限和插件问题,因为问题的主要原因通常是语法错误。
Access Control Check
Performs a check against the supplied string to see if the user performing the command has that permission. It is meant to assist in debugging permissions in game from the affected user. It is also helpful in proving that a specific user has a specific permission when they keep telling you they don’t and they need their profile updated.
Syntax:
/acc permission.node
Example: /acc permissions.build
/acc amchat.radio.personal.*
/acc amchat.radio.fixed.*
/acc amchat.radio.override.*
Returns:
[ACC]: permissions.build - true
[ACC]: amchat.radio.personal.* - true
[ACC]: amchat.radio.fixed.* - false
[ACC]: amchat.radio.override.* - false
This would tell me I currently don’t have the ability to use the “fixed” radio features of the AMChat plugin, I also don’t have the override permissions group.
This plug-in is per user so if you want to test out multiple groups you need multiple users or at the very least one user and an admin that can move them around to different groups.
If you get false on something copied right out of a permissions file, the issue might be due to either a bad yml file that isn’t correctly formatted.
Check you yml file to make sure your not putting spaces and look on the console for errors. When something shows True and doesn’t work in game it is usually due to a bad plug-in or a plug-in conflict.
Source: ACC.java I created this to help trouble shoot permissions and plugins since the number one cause of problems is usually a syntax error.
评论 0
登录后参与评分
还没有评论,来抢沙发吧