由于对市面上其他权限管理插件不满意,我着手开发了一个更轻量、更优雅的插件来处理基于组的权限。该插件注重让所有命令一目了然,并在查询时提供有用的详细信息。你只需输入 /help GroupPermsLite 并阅读命令描述,即可轻松进行权限管理。
如果你不熟悉 Bukkit 权限系统,请参阅 Wiki 文章 和 论坛常见问题解答
- 简单优雅
- 易于使用和理解
- 允许设置无限数量的组(名称不区分大小写)
- 拥有一个名为 "all" 的默认组,适用于所有加入服务器的玩家,无论他们属于其他哪些组
- 为每位玩家拥有唯一的个人组,名为 "personal_[玩家名称]",允许设置单独的权限
- 以 YAML 格式保存,高级用户可以在磁盘上读取和管理,并通过命令在服务器运行时重载配置
- 提供简单易用的命令来向组中添加/移除玩家,以及授予/撤销组的权限
- 在使用命令授予权限时,允许使用通配符 (*) 来匹配权限字符串中节点的任意值
- 允许使用 (-) 运算符添加否定权限,以防止特定组从任何其他来源获得给定权限
- /hasPermission ([玩家]) [权限节点] - 用于手动检查玩家权限以及在命令方块中使用(4.4 版本及以上可用)
- 已注册权限节点的 Tab 自动补全
- 支持 Vault,以便与 LWC 等插件的组功能更好地兼容
- 一个重命名玩家的命令,以支持 Mojang 即将推出的改名功能
| 命令 |
权限 |
描述 |
| /GroupCreate [组] |
group.admin |
创建一个组,但不添加玩家或权限 |
| /GroupAddPlayer [组] [玩家] |
group.admin |
将玩家添加到指定组(如果组不存在则自动创建) |
| /GroupRemovePlayer [组] [玩家] |
group.admin |
从指定组中移除玩家 |
| /GroupGrantPerms [组] [(-)权限字符串] |
group.admin |
向指定组授予给定权限(如果组不存在则自动创建) |
| /GroupRevokePerms [组] [权限字符串] |
group.admin |
从指定组中撤销给定权限 |
| /GroupListPerms [组] ([页码]) |
group.admin |
列出指定组的所有权限 |
| /GroupListPlayers [组] |
group.admin |
列出指定组中的所有玩家 |
| /GroupList |
group.admin |
列出所有组 |
| /GroupDelete [组] |
group.admin |
删除指定组 |
| /GroupReload |
group.admin |
从磁盘重载配置 |
| /RegisterPerm [权限节点] [默认(op/not-op/true/false)] |
group.admin |
手动注册未注册的权限节点 |
大多数命令都有一个“静默”功能,通过在命令末尾放置 "-s"(不含引号)来激活。这旨在与命令方块和命令脚本插件配合使用,让你通过这些工具管理权限而不会产生大量的控制台刷屏。不过,如果命令失败,你仍然会收到响应。
提示权限未注册,我该怎么做?
有时插件开发者可能会忘记或不屑于将其权限注册到 Bukkit,但在代码中仍会使用它们。幸运的是,Bukkit 的 permissions.yml 文件可以在此提供帮助。你应该能在服务器目录中找到 permissions.yml 文件。服务器管理员使用该文件来手动注册额外的权限。有关编辑 Permissions YAML 的详细信息,请参阅 。它通常用于将权限分组以便一次性分配(这与 GroupPermsLite 兼容!),但当然你也可以手动注册某个插件的所有未注册权限。
例如,以下是如何注册 Essentials(最臭名昭著的不注册权限的插件)的所有权限的方法:。如果您使用 Essentials,可以将这些内容复制粘贴到您的 permissions.yml 中。请注意,权限节点周围带有方括号 [ ] 的权限表示您必须将其更改为您所需的具体类型才能使其生效。
v0.4 更新内容:新增对未注册权限的支持——您将能够向组授予未注册的权限,并会弹出确认提示。
本插件使用 Java 7
如果在安装此插件启动服务器时出现以下错误:“Unsupported major.minor version 51.0”,这意味着您正在使用的 Java 版本已过时。如果您不知道如何升级,请联系您的服务器托管提供商并请求帮助升级到 Java 7,或联系 Oracle 客户支持。Mac OS X 用户需要 JDK 7 而不是 JRE 7。
如果您希望为本项目的持续开发、支持和维护做出贡献,请考虑加入我的 Patreon,并进行一次性或定期赞助。
如果您需要帮助,可以在下方留言,我会在尽可能短的时间内回复您。您也可以通过以下链接加入我的 IRC 聊天室。请注意,我不一定随时都在键盘前!
Unsatisfied with a number of other permissions management plugins publicly available, I sought to create a lighter and more elegant plugin to handle group-based permissions. With a focus to making all of the commands understandable at a glance and providing helpful details when queried. You should be able to get on with permissions management simply through typing /help GroupPermsLite and reading the command descriptions.
If you are unfamiliar with Bukkit permissions, please see the Wiki Article and the Forum FAQ
- Simple and elegant
- Easy to use and understand
- Allows setting up an unlimited number of groups (names are case-insensitive)
- Has a default group called "all" that applies to all players that have joined the server, nomatter what other groups they are in
- Has a unique group for each player called "personal_[player name]" that allows individual permissions settings
- Saved in YAML format, advanced users can read and manage on disk and reload while the server is running using a command
- Simple and easy to use commands to add/remove players from groups and grant/revoke permissions from groups
- Allows use of the wildcard (*) to match any value for a node in a permission string when granting permissions using a command
- Allows adding negative permissions using the (-) operator to prevent a particular group from receiving the given permission from any other source
Ideas for future development
- /hasPermission ([player]) [permission node] - For manually checking permissions of a player and for use in command blocks (Available from 4.4 onwards)
- Tab auto-completion for registered permission nodes
- Support for Vault for better compatibility with plugins such as the LWC group feature
- A command to rename a player in order to support upcoming Mojang name changing feature
| Command |
Permission |
Description |
| /GroupCreate [group] |
group.admin |
Creates a group without adding a player or permission |
| /GroupAddPlayer [group] [player] |
group.admin |
Adds a player to the given group (creates the group if it doesn't already exist) |
| /GroupRemovePlayer [group] [player] |
group.admin |
Removes a player from the given group |
| /GroupGrantPerms [group] [(-)permission-string] |
group.admin |
Grants the given permission(s) to the specified group (creates the group if it doesn't already exist) |
| /GroupRevokePerms [group] [permission-string] |
group.admin |
Revokes the given permission(s) from the specified group |
| /GroupListPerms [group] ([page number]) |
group.admin |
Lists all of the permissions for a given group |
| /GroupListPlayers [group] |
group.admin |
Lists all players in a given group |
| /GroupList |
group.admin |
List all groups |
| /GroupDelete [group] |
group.admin |
Deletes a given group |
| /GroupReload |
group.admin |
Reloads config from disk |
| /RegisterPerm [permission node] [default(op/not-op/true/false)] |
group.admin |
Manually register an unregistered permission node |
Most commands have a "silent" feature that is activated by placing a "-s" (without quotes) at the end. This is intended to be used with command blocks and command scripting plugins to allow you to manage your permissions through these without generating lots of console spam. You will still get a response if the command fails however.
- RankDisplayNames - Create ranks with chat prefixes that update automatically with permissions set through GroupPermsLite
It says the permission is not registered, what can I do?
Sometimes plugin developers will forget or simply not bother to register their permissions with Bukkit, but still use them in their code. Fortunately, the bukkit permissions.yml file can come to the rescue here. You should be able to find the permissions.yml file in the server directory. It is used by server owners to manually register additional permissions in bukkit. See for details about editing the Permissions YAML. It is usually used to group permissions together so that they can all be assigned at once (this is compatible with GroupPermsLite!), however there is also nothing stopping you from registering all of the unregistered permissions for a plugin manually.
For example, here is how to register all of the permissions for Essentials (the most notorious for not registering their permissions): . You can cut and paste these into your permissions.yml if you use essentials. Be aware that permissions with square brackets [ ] around a permission node mean that you have to change that to the specific type you want in order for it to work.
Coming in v0.4: Added support for unregistered permissions - You will be able to grant unregistered permissions to a group with a prompt for confirmation
This plugin uses Java 7
If you get the followed error on starting up the server with this plugin installed "Unsupported major.minor version 51.0". This means you are using an out of date version of Java. If you don't know how to upgrade, please contact your server hosting provider and ask them for help in upgrading to Java 7, or contact Oracle customer support. Mac OS X users require JDK 7 instead of JRE 7.
If you'd like to contribute towards the continued development, support and maintenance of this project, please consider joining me on Patreon, and making a one-time or recurring pledge.
If you need help you can leave a comment below and I will get back to you as soon as I can. You can also join my IRC chatroom using the following link. Please note, I am not always at my keyboard!
评论 0
登录后参与评分
还没有评论,来抢沙发吧