zPermissions — 适用于 Bukkit 的 Superperms 插件
zPermissions 主要是一个基于 SQL 数据库的 Superperms(即 Bukkit 权限)实现。它还支持扁平文件存储。 notable features 包括:多世界支持、具有多条轨道/梯队的等级、任意深度的组继承(在合理范围内),以及使用 WorldGuard 区域、Residence 领地、Factions 领土或 Factoid 土地的区域特定权限。
没有内置的建筑保护功能(我依赖其他插件来实现这一点)。zPermissions 专注于权限,仅此而已。
我的目标是让 zPermissions 成为一个简单但功能丰富的 Superperms 提供者。
从 1.3beta1 版本开始,zPermissions 支持 UUID!有关详细信息,请参阅该版本的说明。
[ 快速入门文档 | 面向服务器管理员 | 常见问题解答 | 更多文档如下! ]
有问题?遇到问题?
首先,请检查已知问题以及常见问题解答。
如果您的问题仍未得到解答,请在论坛上发帖。
最后,对于任何错误/问题,请创建dev.bukkit.org 工单。
除非我已经认识你,否则私信将被忽略。
特性
-
多种存储选项,从 SQL 到扁平文件。 使用 Bukkit 数据库存储权限(即 bukkit.yml 中的设置)。应与 Avaje Ebean 支持的大多数数据库一起工作——我已专门测试了 PostgreSQL、MySQL 和 H2。默认的 Bukkit 数据库 SQLite 不受支持。如果使用它,zPermissions 将自动回退到扁平文件存储。
-
组继承。 组可以从多个父组继承权限。
-
玩家可能属于多个组。 应用组权限的顺序是明确定义的,并基于组权重(当然,这是可配置的)。
-
多世界支持。 授予玩家和组的权限可以与特定世界关联。
-
可选的区域支持。 权限也可以与 WorldGuard 区域或 Residence 住所关联。
-
多条晋升路径! 使用权限,您还可以限制谁可以晋升/降级他人以及他们可以使用哪些路径。此外,每个玩家都可以沿多条路径进行晋升/降级。
-
短期临时权限。 给玩家一个持续时间为几秒到几分钟的权限节点。
-
临时组分配。 将组分配给玩家,使其成员资格在1天……几个月……或一年后过期!无论您想要什么持续时间。
-
可以为玩家和组分配聊天前缀和后缀。 仍然需要一个与 Vault 兼容的聊天格式插件,例如 Herochat、zChat 等。
-
API。 zPermissions 提供了一个全面的 只读 API,其他插件可以使用它。(尽管我建议使用 Vault 进行编码。)
-
元数据支持。 玩家和组可以具有与之关联的任意元数据。元数据值可以是字符串、整数、实数(浮点数)和布尔值。可以通过原生 API 或 Vault Chat API 查询元数据。
-
自动组权限。 随着 Superperms/Bukkit 权限的出现,测试组成员资格的推荐方法是使用权限。zPermissions 可以根据每个组的名称自动设置一个权限。默认情况下,此可配置权限为 group.<groupname>(与 WorldEdit 和 WorldGuard 开箱即用兼容!)。
-
可重新分配的默认组。 默认组(未明确分配到任何组的玩家被分配的组)名为 default。这可以更改。
概念
-
组是“通用的”——跨所有世界。没有计划引入特定于世界的组。
-
然而,玩家和群组可能拥有特定世界和/或特定区域的权限。这些权限仅在玩家处于该特定世界和/或区域时生效。
-
权限共有 4 个“层级”:通用、世界专属、区域专属,以及最终的区域与世界专属。最通用的权限会优先应用,且所有组权限会先于玩家权限应用:
- 通用组权限
- 世界专属组权限
- 区域专属组权限
- 区域与世界专属组权限
- 通用玩家权限
- 世界专属玩家权限
- 区域专属玩家权限
- 区域与世界专属玩家权限
-
玩家可以属于多个组。可以为组分配权重 — 权重越高,该组的优先级越靠后,从而覆盖之前的组。权重相同的组按字母顺序应用。
-
组可以继承自一个或多个父组。组的父组以逆序应用,以便组的第一个父组能够覆盖所有后续父组。
安装与用法
将 zPermissions.jar 放入服务器的 plugins 目录中。启动服务器。这将在服务器的 plugins/zPermissions 目录下创建 config.yml 文件。你可能需要编辑此文件以设置默认组和默认轨道。你也可以创建自己的轨道。
输入 /permissions 开始使用。(如果可用别名,/perm 或 /p 也可以工作。)
get、set 和 unset 子命令中的权限节点可以指定为:
- <permission> — 未限定的权限节点适用于所有世界和所有区域。
- <world>:<permission> — 要使权限成为世界专属的,请在其前加上世界名称并跟随冒号。
- <region>/<permission> — 要使权限成为区域专属的,请在其前加上区域名称并跟随斜杠。
- <region>/<world>:<permission> — 你还可以通过组合两个限定符使权限同时具备区域和世界专属特性。目前,区域限定符必须始终放在前面。
等级命令为 /promote、/demote、/setrank 和 /unsetrank,通常会将更改广播给所有管理员。等级命令有一个选项 -q 用于静默操作,例如在被自动化进程调用时。但是,出于安全审计目的,它们仍会将操作记录到服务器日志中。与 -q 相反,它们也接受 -Q,这会导致等级命令将更改广播给所有用户。
更多文档
许可证与源码
zPermissions 根据 Apache License, Version 2.0 发布。
源代码可在 GitHub 上找到:
本项目的开发版本可以从提供的持续集成服务器获取。这些版本未经 BukkitDev 工作人员批准。请自行承担使用风险。
待办事项
- 更全面的单元测试,特别是针对服务接口。
- 更好的组织文档。
zPermissions — A Superperms plugin for Bukkit
zPermissions is primarily an SQL database-backed Superperms (aka Bukkit permissions) implementation. It also supports flat-file storage. Notable features are: multi-world support, ranks with multiple tracks/ladders, group inheritance of arbitrary depth (within reason), and optional region-specific permissions using WorldGuard regions, Residence residences, Factions territories, or Factoid lands.
There is no built-in build protection (I rely on other plugins for that). zPermissions focuses on permissions and only permissions.
I aim to keep zPermissions a simple, yet feature-rich, Superperms provider.
zPermissions supports UUIDs as of the 1.3beta1 release! See the notes for that release for details.
[ Quick start documentation | For Server Admins | FAQ | More documentation below! ]
Questions? Problems?
First, please check the known issues as well as the FAQ.
If your question is still unanswered, please post on the forum.
Finally, for any bugs/issues, please create a dev.bukkit.org ticket.
Unless I already know you, PMs will be ignored.
Features
-
A variety of storage options, from SQL to flat-file. Uses Bukkit database to store permissions (i.e. settings in bukkit.yml). Should work with most databases supported by Avaje Ebean — I've specifically tested with PostgreSQL, MySQL, and H2. The default Bukkit database, SQLite, is not supported. zPermissions will automatically fall back to flat-file storage if it is used.
-
Group inheritance. Groups may inherit permissions from a multiple parent groups.
-
Players may be members of more than one group. The order of which group permissions are applied is well defined and based on group weight (which is configurable, of course).
-
Multi-world support. Permissions granted to players and groups may be associated with a specific world.
-
Optional region support. Permissions may also be associated with WorldGuard regions or Residence residences.
-
Multiple promotion tracks! Using permissions, you can also limit who can promote/demote others and which tracks they may use. In addition, each player may be promoted/demoted along multiple tracks.
-
Short-term temporary permissions. Give a player a permission node that lasts anywhere from a few seconds to a few minutes.
-
Temporary group assignments. Assign a group to a player and have their membership expire after 1 day... a few months... or a year! Whatever duration you want.
-
Players and groups can be assigned chat prefixes and suffixes. A Vault-compatible chat-formatting plugin is still required, like Herochat, zChat, etc.
-
API. zPermissions offers a comprehensive read-only API that other plugins can use. (Though I would recommend coding against Vault instead.)
-
Metadata support. Players and groups may have arbitrary metadata associated with them. Metadata values may be strings, integers, reals (floating point), and booleans. Metadata may be queried via the native API or Vault Chat API.
-
Automatic group permissions. With the advent of Superperms/Bukkit permissions, the recommended way of testing group membership is by using permissions. zPermissions can automatically set a permission based on the group's name for each group. By default, this configurable permission is group.<groupname> (compatible out-of-the-box with WorldEdit and WorldGuard!).
-
Re-assignable default group. The default group (the group assigned to players who have not been explicitly placed into any groups) is named default. This may be changed.
Concepts
-
Groups are "universal" — across all worlds. There are no plans to introduce world-specific groups.
-
However, players and groups may have world-specific and/or region-specific permissions. These permissions are only in effect when the player is in that particular world and/or region.
-
There are 4 "levels" of permissions: universal, world-specific, region-specific, and finally region- and world-specific. The most general permissions are applied first, with all group permissions applied first finally followed by player permissions:
- Universal group permissions
- World-specific group permissions
- Region-specific group permissions
- Region- and world-specific group permissions
- Universal player permissions
- World-specific player permissions
- Region-specific player permissions
- Region- and world-specific player permissions
-
Players may be members of multiple groups. Groups may be assigned a weight — a higher weight means the group is applied later so it overrides earlier groups. Groups with the same weight are applied alphabetically.
-
Groups may inherit from one or more parent groups. A group's parents are applied in reverse order so that a group's first parent overrides all subsequent parents.
Installation & Usage
Put zPermissions.jar in your server's plugins directory. Start up your server. This will create the file config.yml in your server's plugins/zPermissions directory. You may want to edit this file to set your default group and default track. You may also want to create your tracks.
Type /permissions to get started. (/perm or /p may also work, if those aliases are available.)
The permission nodes in the get, set, and unset sub-commands may be specified as:
- <permission> — An unqualified permission node applies to all worlds and all regions.
- <world>:<permission> — To make a permission world-specific, prefix it with the world name followed by a colon.
- <region>/<permission> — To make a permission region-specific, prefix it with the region name followed by a slash.
- <region>/<world>:<permission> — You may also make a permission both region- and world-specific by combining the two qualifiers. For now, the region qualifier must always come first.
The rank commands are /promote, /demote, /setrank, and /unsetrank and will normally broadcast changes to all admins. The rank commands have an option -q to operate silently, e.g. when being called by automated processes. They will, however, still log their actions to the server log for security audit purposes. Opposite of -q, they will also take -Q which causes the rank commands to broadcast changes to all users.
More Documentation
License & Source
zPermissions is released under the Apache License, Version 2.0.
Sources may be found on GitHub:
Development builds of this project can be acquired at the provided continuous integration server.
These builds have not been approved by the BukkitDev staff. Use them at your own risk.
To Do
- More extensive unit tests, especially on the service interface.
- Better organized docs.
评论 0
登录后参与评分
还没有评论,来抢沙发吧