市面上有许多权限插件可供选择。这不过是其中之一。
简介
本插件旨在尽可能让权限管理变得用户友好。它拥有一个易于使用的游戏内菜单系统,用于进行权限修改,同时也提供了相当易懂的命令。它所生成的文件也非常易用,因为它们不像 YAML 文件那样严格。缩进和空白字符无需担心。
功能
- 服务器全局权限
- 按世界划分的权限
- 继承多个组别
- 聊天前缀和名称颜色
- 提升与降级玩家
- 重命名和删除组别
- 完整的游戏内菜单系统
指南
本插件的完整指南请参见此处:
什么是权限?
如果你从未使用过权限插件,你可能不清楚它们的工作原理或用途。如果是这样,那么本节内容就是为你准备的。如果你已经熟悉其他权限插件,可以跳过本节。
权限插件允许你对玩家能够执行的操作进行详细控制。每个插件都可以定义特定的权限“节点”(permission nodes),以控制来自该插件的特定操作。节点通常采用 pluginname.command 或 pluginname.feature.something 的形式。为了使用该命令或功能,玩家必须拥有相关的权限节点。每个插件的项目页面或网站上都应列有其权限节点列表。
本插件允许你直接将权限节点分配给玩家。它还允许你设置权限组。然后你可以将权限节点分配给组别,而不是直接分配给玩家。接着,你可以将玩家放入他们所属的组别中,他们将继承该组别的权限。
此外,组别还可以是其他组别的成员。例如,你可以有一个“admins”组,它继承(作为成员)“moderators”组,而后者又继承“members”组。如果玩家将自身置于“admins”组中,他们将获得这些权限,以及“moderators”和“members”的权限。
本插件还允许你设置服务器全局权限和世界特定权限。例如,你可以将某个权限节点赋予一个组别,但随后在该特定世界中移除该组别的该权限节点。或者,你可以完全忽略服务器全局权限,将所有权限数据放在各个单独的世界中。如何设置由你决定。
安装与配置
只需下载文件并将其放入你的 plugins 文件夹即可安装。如果你是从另一个权限插件转换而来,有一些可用的转换命令。
在安装后首次启动服务器时,会在你的 plugins/YAPP 文件夹中创建一个 config.txt 文件。关于此配置文件(以及本插件创建的所有文件)的一个重要特点是,它们比 yml 文件更加友好。添加额外的空白字符是可以的,包括制表符和空格。
配置值的名称相当不言自明,但完整的描述可以在插件指南的配置部分找到。
权限
本插件使用几个权限节点。其中重要的有:
- yapp.admin - 只有拥有此权限的人才能使用游戏内的命令来修改权限设置。默认为仅 OP 可用。
- yapp.build - 玩家必须拥有此权限才能与世界交互。此权限可以在配置文件中禁用。默认为 false。
还有用于提升和降级命令的权限,以及可以控制玩家与世界交互能力的权限。完整列表可在插件指南的权限部分找到。
使用方法
修改权限设置的方法设计得非常简单易用且易于记忆。实际上有三种方法可以对权限系统进行更改。
请记住,使用任何这些方法进行更改时,你需要重新加载以使更改生效。在菜单中,重新加载选项位于主菜单,选项 '5' 或 'S' 或 'R'。重新加载的命令是 /yapp @ 或 /yapp reload。你也可以使用命令 /yapp @ player 仅重新加载特定玩家的权限。请注意,这只适用于简单的更改,如直接向玩家添加或移除权限节点或组别(如果你向组别添加或移除权限,重新加载玩家不会重新加载组别更改)。
菜单
本插件的主要命令是 /yapp。还提供别名 /perm 和 /perms。如果单独使用此命令而不带任何参数,它将打开一个引导式菜单系统。菜单是使用最简单的方法来对权限和组别信息进行简单修改的方式。
当你处于菜单系统中时,有几个选项始终对你可用。
- < 将返回你到上一个菜单
- ! 将返回主菜单
- ? 会告知你当前的选择,并有时提供关于当前屏幕的帮助信息
- q 或 quit 将退出菜单
许多菜单屏幕都会有一个带有编号选项和突出显示单词的列表。要选择某个选项,你可以输入数字、输入突出显示的单词,或者仅输入单词中的突出显示字母。
命令
使用常规命令更改设置需要依次执行多个命令。这些命令既可以在游戏内(拥有 yapp.admin 权限节点)使用,也可以在命令行中使用。一般来说,你的命令将遵循以下模式:
- 选择某物(玩家或组,以及所需的世界)
- 对选定的对象进行更改
- 保存设置并重新加载权限数据
你可以查看 一些示例 以帮助你理解其工作原理。
还有用于 提升和降级 玩家的命令。
文件
此插件的文件存储系统设计为易于阅读和理解。它兼容空白字符,意味着你可以添加额外的空格、制表符和换行符而不会出现问题。唯一的缺点是信息分散在许多不同的文件中。然而,这也可以被视为一种优势,因为无需滚动浏览巨大的文件来查找你所寻找的内容。
如需更多信息,请参阅 插件指南的文件部分。
源代码
完整源代码可在我的 Google Code 仓库中找到:
问答
为什么创建另一个权限插件?
部分是为了学习。部分是因为我想制作一个更好的插件。还因为我就是想做。有些人可能会因为我在众多权限插件中又增加一个而讨厌我,但我个人认为我创造了一些有用的东西。
这个支持 Vault 吗?
它应该完全支持 Vault,包括任何依赖 Vault 的插件。
我可以使用 '*' 节点吗?
支持特殊通配符节点,但它们有一些限制。请参见指南中的 通配符信息。
为什么有这么多文件?
为什么这么少?我知道很多人喜欢将权限数据塞进少数几个文件中,但我个人觉得分散存储更好。在庞大的文件中挖掘特定用户或组的信息令人烦恼。这样,你可以轻松地看到所有文件(可能按字母顺序排列),并相当快速地找到你正在寻找的内容。
There are many permission plugins available to choose from. This is yet another one.
Introduction
The aim of this plugin is to make managing permissions as user-friendly as possible. It has an easy to use in-game menu system for making permission modifications, as well as fairly easy to understand commands. The files it creates are also very user-friendly, as they are not as strict as YAML files. Indentation and whitespace are not a concern.
Features
- Server-wide permissions
- Per-world permissions
- Inherit multiple groups
- Chat prefixes and name colors
- Promote and demote players
- Rename and delete groups
- Complete in-game menu system
Guide
The full guide to this plugin can be found here:
What Are Permissions?
If you have never used a permissions plugin before, you may not know exactly how they work or what they are used for. If that is true, then this section is for you. If you are already familiar with other permissions plugins, you can skip this section.
A permissions plugin allows you to have detailed control over what kinds of things your players can do. Each plugin can define certain permission "nodes" that control certain actions from that plugin. A node generally takes the form of pluginname.command or pluginname.feature.something. In order for a player to use that command or feature, they must have the associated permission node. Each plugin should have a list of permission nodes somewhere on its project page or website.
This plugin allows you to assign permission nodes directly to players. It also allows you to set up permission groups. You can then assign permission nodes to groups instead of to the players. Then you can put a player in the groups they belong in, and they will inherit the permissions of the group.
In addition, groups can be members of other groups. So for example, you could have an "admins" group, that inherits (is a member of) the "moderators" group, which inherits the "members" group. If a player is placed in the "admins" group, then they will get those permissions, as well as the "moderators" and "members" permissions.
This plugin also allows you to set up server-wide permissions and world-specific permissions. For example, you could give a certain permission node to a group, but then remove that permission node for that group in a specific world. Or you can ignore server-wide permissions all together and put all permission data in each individual world. How you set it up is your choice.
Installation and Configuration
Simply download the file and drop it into your plugins folder to install. If you are converting from another permissions plugin, there are some conversion commands available.
When you start your server for the first time after installing, a config.txt file will be created in your plugins/YAPP folder. An important thing about this configuration file (and all files this plugin creates) is that they are much more friendly than yml files. It is okay to add extra whitespace, including both tabs and spaces.
The names of the config values are fairly self-explanatory, but a full description can be found in the config section of the plugin guide.
Permissions
This plugin uses several permission nodes. The important ones are:
- yapp.admin - Only those with this permission can use the in-game commands to modify permission settings. Defaults to op-only.
- yapp.build - A player must have this permission to interact with the world. This permission can be disabled in the configuration file. Defaults to false.
There are also permissions for the promote and demote commands, as well as permissions that can control a player's ability to interact with the world. A full list can be found in the permissions section of the plugin guide.
Usage
The methods for modifying permission settings are designed to be very easy to use and easy to remember. There are actually three ways to make changes to the permission system.
Remember when making changes with any of these methods you will need to reload for the changes to take effect. In the menu, the option to reload is in the main menu, option '5' or 'S' or 'R'. The command to reload is /yapp @ or /yapp reload. You can also reload just a specific player's permissions with the command /yapp @ player. Note that this will only reload simple changes, like adding or removing permission nodes or groups directly to the player (if you add or remove permissions to a group, reloading the player will not reload the group changes).
Menu
The main command in this plugin is /yapp. The aliases /perm and /perms are also available. If you use this command on its own without any arguments, it will open a guided menu system. The menu is the easiest way to make simple modifications to permission and group information.
While you are in the menu system, there are a few options that are always available to you.
- < will return you to the previous menu
- ! will return you to the main menu
- ? will tell you your current selection, and will sometimes give help about the current screen
- q or quit will exit the menu
Many of the menu screens will have a list of numbered options with highlighted words. To select an option, you can either type the number, type the highlighted word, or just type the highlighted letter within the word.
Commands
Changing settings with normal commands will require multiple commands in sequence. These commands can be used both in-game (with the yapp.admin permission node) and on the command line. In general, your commands will use the following pattern:
- Select something (a player or group, and world if desired)
- Make changes to the selected object
- Save the settings and reload the permission data
You can look at some examples to help you understand how it works.
There are also commands for promoting and demoting players.
Files
The file storage system for this plugin is designed to be very easy to read and understand. It is whitespace-friendly, meaning you can add extra spaces, tabs, and line breaks without problem. The one disadvantage is that the information is spread into many different files. However, this can also be seen as an advantage, as you don't have to scroll through huge files to find what you're looking for.
For further information, please see the files section of the plugin guide.
Source
The full source can be found on my repository on Google Code:
Question and Answers
Why create another permission plugin?
Partly to learn. Partly because I wanted to make a better plugin. And because I just felt like it. Some may hate me for adding yet another permission plugin to the pool, but I personally think I've created something useful.
Does this support Vault?
It should fully support Vault, including any plugins that depend on Vault.
Can I use the '*' node?
Special wildcard nodes are supported, but they have some restrictions. See the wildcard information in the guide.
Why so many files?
Why so few? I know a lot of people prefer to have their permission data crammed into just a couple files, but I personally think it's nice to have it spread out. Digging through a massive file for a specific user or group is just annoying. This way, you can easily see all the files, probably in alphabetical order, and find exactly what you're looking for fairly quickly.
下载 YAPP (Yet Another Permissions Plugin)
下载 YAPP (Yet Another Permissions Plugin)
下载 YAPP (Yet Another Permissions Plugin)
下载 YAPP (Yet Another Permissions Plugin)
下载 YAPP (Yet Another Permissions Plugin)
下载 YAPP (Yet Another Permissions Plugin)
下载 YAPP (Yet Another Permissions Plugin)
下载 YAPP (Yet Another Permissions Plugin)
下载 YAPP (Yet Another Permissions Plugin)
下载 YAPP (Yet Another Permissions Plugin)
- 添加了 yapp.deny.chat 和 yapp.deny.commands 权限节点(必须在“禁止权限”配置部分启用)
- 修复了 Vault 支持问题
- 修复了其他小错误
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
ExyliaPlugins 的库。
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
插件
创建用户友好的菜单以前往不同的世界
插件
专为 Velocity 打造的自制聊天插件,功能丰富——支持跨服群组/全局/私聊消息,并集成 LibertyBans 的禁言功能。
插件
一个高度兼容、功能完善且稳定的 TPA 模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧