Good Fences Make Good Neighbors
基于 MySQL 的玩家控制插件,引入了源自 Unix 的超级用户概念。玩家通过 MySQL 表进行管理。完整实现需要同时安装 Logblock 和 Pex。
OPs as Players
SuperUser 凭借其自动化的玩家处理机制和伤害回滚功能,很好地补充了大多数服务器上常见的基于插件的权限安全体系。
该插件不仅挂钩到强大的 PEX 权限系统,还使用 PEX API 来管理权限组。它按组配置自身,完全依赖 PEX 进行设置。
By-Player vs. By-Plugin
虽然 SuperUser 看似为 Bukkit 安全体系增加了一层复杂性,但它也有潜力简化管理员或版主的工作。它允许管理员针对每个玩家标准化并控制其在 Minecraft 功能方面的操作权限。例如,创造模式服务器经常尝试新插件,我敢打赌他们希望能在安全的前提下让玩家成为 OP(操作员)以测试这些插件。维护一个不断变化的权限系统往往令人头疼。
由于 SuperUser 不关心特定插件的使用情况,因此它能更好地发现那些找到后门访问权限的违规玩家。SU 会捕获他们并予以处理。对于那些对服务器作弊习以为常的玩家来说,SU 可能会带来令人不安的意外惊喜。
Super User
超级用户(以下简称“超管”)是唯一不受监控的玩家。可以针对每个玩家设置特定的权限,这些权限将覆盖任何现有的权限系统。例如,某玩家可能是 OP,但这并不意味着他/她可以飞行、使用 TNT、封禁他人或更改游戏模式等,除非本插件明确允许。超管可以将申请成为 OP 的玩家设为 OP,同时剥夺该玩家的所有 Minecraft 能力。
超管在 SQL 玩家记录中被定义为此类。我绝不会声称该系统不可战胜,因为那只会自讨苦吃。但 SQL 服务器通常被信任用于处理金融交易,并且设计上就具备安全性。这部分的安全保障掌握在服务器构建者手中,而该工具已经成熟且稳固。
Bukkit Versioning
SuperUser 严格遵循 Bukkit API,不会在 Bukkit 重命名 Minecraft 类时崩溃。
Asynchronous MySQL
我们小心地将 MySQL 处理运行在 Bukkit/Minecraft 主线程之外。理论上,该插件对服务器整体性能的影响微乎其微,同时在自动管理玩家方面却能发挥巨大作用。当然,SQL 服务器通常运行在独立的机器上,进一步减轻了 Bukkit 服务器的负担。这通常被称为可扩展性。大部分 SQL 引用是通过记录 ID(即主表索引)进行的。这是访问 SQL 记录最高效的方式,无需进行搜索。这就像通过索引引用数组值,而不是遍历搜索数组一样。而且速度极快,几乎不需要额外开销。
Player Cache
该插件采用了详细的玩家缓存机制,使其能够非常快速地响应监听事件,而无需等待 SQL 请求。只要可能,这一切都在异步状态下完成。玩家在线时始终处于缓存状态,退出时则清除缓存。玩家缓存会在后台定期刷新到数据库表中,且不占用主线程。也可以使用 'dirty' 字段通过命令手动刷新。SuperUser 的设计初衷是既能通过控制台管理,也能通过 Web 应用管理,甚至支持玩家自行管理。
Offenses
违规行为分为不同类别,如重罪、违约、入侵、伤害、破坏等……发生时会累计计数。违规玩家在受到警告后会被明确提示,并提醒其已收到的警告次数。当某一特定行为的警告达到预设阈值时,该玩家将被移至所谓的“访客区”,剥夺所有权限,并被限制活动(tarpitted)。访客玩家不允许超出指定位置的一定半径范围。访客没有编辑权限,也无法聊天。访客只有一个命令,即 '/ask'。这是与超管沟通的唯一渠道,且每次使用之间必须有 10 秒的延迟。将玩家置于访客状态,在实际效果上等同于封禁,但避免了封禁带来的所有负面影响。
除非被封禁,否则被系统踢出或置为访客状态的玩家将在 24 小时后重置并获得另一次机会。
Jail
SuperUser 的监狱功能通过位置和半径来定义,类似于访客区域,但效果相反。它不是为了关押玩家,而是旨在最终释放他们,希望他们得到改造。使用 /va_setjail 命令来定义监狱位置;半径在 ‘config.yml’ 中设置。可以从控制台或由拥有超级权限的玩家使用 ‘/jail <player> [minutes/default:10]’ 将玩家送入监狱。内置的监狱命令名为 /va_jail,但 SuperUser 也会响应 /jail,并且应该覆盖任何使用相同命令名的插件,同时惩罚任何非超级用户尝试使用该命令的行为。
被监禁的玩家保留其等级,但会被转移到监狱并保持在生存模式,直到释放。像访客一样,被监禁的玩家只有一个命令,即延迟执行的 '/ask'。它仅与超级用户通信。当命令定义的期限到期或被监禁玩家离开(逃脱)定义的监狱半径时,就会发生释放。如果被监禁的玩家不遵守警告,仍可能被系统踢出。假设玩家因可能涉及破坏行为而被监禁,因此自登录以来所做的任何工作都会在入狱时自动回滚,并在释放或退出时再次回滚以恢复监狱区域。
注册
SuperUser 确实使用了一种非侵入式的注册和登录流程,旨在减缓黑客攻击并为离线服务器提供中等程度的安全性。玩家只需进行一次 /register,并且在 IP 地址更改时才需要 /login。
命令
这份 命令列表 直接来自 'plugin.yml',记录了可用的命令。可以直接在 SQL 表中进行玩家控制。对于 false 使用 'f'、'0' 或 'n',对于 true 使用 't'、'1' 或 'y'。使用部分组名。将 'dirty' 字段更改为除 'false' 以外的任何值,如果针对的是在线玩家,SuperUser 将验证并实施更改。在 dirty 字段中输入 'flush' 以向 SuperUser 发出信号,将其玩家缓存刷新到数据库。这是为了设计如 Web 界面之类的用户界面而准备的。
命令确认
我在 Postal 插件上优化的命令确认功能也应用在此插件上。这意味着你只需要输入玩家名称的足够字符以唯一标识该名称,SuperUser 就会为你补全。你将有机会通过单个 '/' 进行确认。除非是仅限在线玩家的命令,否则 SuperUser 会优先尝试对在线玩家进行唯一补全,然后再挖掘离线玩家的信息。
隐身
super 字段接受预期的 true 或 false,同时也接受 'stealth'。'stealth' 不仅表示超级用户状态,还意味着完全不可见。隐身的超级用户不会出现在标签页的玩家列表中,也不会在加入、退出或死亡时广播消息。他们不存在,你看……(实际上,如果你‘看不见’,那就更好了)
玩家追踪器
与隐身能力相辅相成的是一个强大的玩家追踪器,仅限超级用户使用。它使用指南针和由新的 Scoreboard API 驱动的 HUD 报告器。如果未检测到 Scoreboard 类,则通过传统消息保持向后兼容性。超级用户获得一个指南针指针,锁定移动的目标。HUD 报告器维持距离和高程统计信息。使用此工具查找玩家没有问题。它也适用于团队合作。两名或多名协同工作的超级用户可以互相锁定,以便他们始终确切知道彼此的位置。
回滚
Logblock 用于自动回滚导致玩家被系统或超级用户踢出的更改。Logblock 还实现了定义玩家工作是否保存的设置。例如,如果玩家的 'save_wrk' 设置为 'false',Logblock 将在玩家退出时回滚其自登录以来的工作。Logblock 还用于维护定义的监狱和访客区域。
入门指南
1) 将 va_superuser.jar 放入你的插件文件夹并启动服务器,然后停止它。
2) 编辑 va_superuser 目录中的 'config.yml' 以配置 MySQL。对于正常的 MySQL 安装,设置非常直接,超出了本步骤描述的范围。
3) 重新启动服务器并在控制台输入 'va_update' 以用服务器上的所有玩家填充玩家表。或者,让要成为超级用户的玩家加入并退出以创建该记录。
4) 从控制台使用 'rank' 命令将该玩家设为超级用户,使用用于管理员的 PEX 组:
rank <player> <group> super
5) 作为该超级用户加入游戏并进行注册。前往你希望新用户生成的位置并输入 '/va_setguest'。该区域用于冷却行为不端的玩家,也可用于预登录处理。半径在 'config.yml' 中定义,且只能由超级用户编辑。
评论
Good Fences Make Good Neighbors
A MySQL based player control that implements the concept of superuser, borrowed from Unix. Players are managed using a MySQL table. SuperUser requires both Logblock and Pex for a full implementation.
OPs as Players
SuperUser complements the typical permission-by-plugin security found on most servers very nicely with its automatic player handling and damage rollback capabilities.
This plugin doesn’t just hook into the robust PEX permission system, it uses the PEX api to manage the permission groups. It uses PEX to configure itself, by group.
By-Player vs. By-Plugin
While SuperUser may appear to be an added level of complexity to Bukkit security, it also has the potential of simplifying admin or moderator duties. It allows admins to standardize, and control what players are allowed to do in terms of Minecraft features, by player. For example, Creative servers often experiment with new plugins and I bet they wish they could safely let players be ops so they can try the plugins out. Maintaining a constantly changing permission system can be a bear.
Since SuperUser doesn't concern itself with the use of specific plugins it is in a good position to catch outlaw players that have found backdoor access. SU catches them and deals with them. SU can be an unsettling surprise for players getting complacent with their server cheats.
Super User
Superusers, from now on called supers, are the only players not monitored. Players may have specific permissions, by player, that override any existing permission system. For example, a player may be an op, but that does not mean he/she can fly, use tnt, ban, change gamemode, etc.. unless this plugin permits it. A super could op a player asking to be op'd and strip that player of all Minecraft capabilities at the same time.
Supers are defined as such on the SQL player record. I would never claim the system is undefeatable because that would just tempt fate. But SQL servers are routinely trusted to handle financial transactions, and are designed to be secured. That portion of security is in the server builder's hands, and the tool is mature and solid.
Bukkit Versioning
SuperUser does not go outside th Bukkit api. Therefore, it will not break every time Bukkit renames Minecraft classes.
Asynchronous MySQL
Care is taken to run MySQL processing off the Bukkit/Minecraft thread. Theoretically, this plugin can have very little impact on general server performance, while doing a lot in terms of automatically managing players. Of course, the SQL server is often run on a separate machine, further relieving the Bukkit server of overhead. This is often called scaleability. The bulk of SQL referencing is by record id, the primary table index. This is the most effecient way to access SQL records, and requires no searching. This is like referencing an array value by index, instead of searching the arrray. It also happens to be blinking fast, requiring very little work.
Player Cache
This plugin employs a detailed player cache making it possible to service its listeners very quickly without the need to wait for SQL requests. This is done asynchronously whenever possible. Players are always cached while online, and flushed on quit. The player cached is periodically flushed to the table in the background, off the main thread. It may also be flushed on command, using the 'dirty' field. SuperUser was designed to be managed by a web app as well as console, and player.
Offenses
There are different categories of offenses such as felony, breach, trespass, harm, damage, etc... that are tallied when incurred. Offending players are clearly warned after an offense and reminded of how many warnings received. When a defined threshold of warnings is reached for a particular offence the player is moved to what is called the guest area, stripped of all permissions, and tarpitted. Guest players are not allowed to go beyond a defined radius from a defined location. Guests don't have editing privileges, nor chat access. Guests have only one command, and that is '/ask'. This is a line of communication only to supers, and must have a 10 second delay between uses. Guest'ing a player, for all practical purposes, is as good as banning a player, but without all the negative implications.
System kicked, or guest'ed players are reset and given another chance after 24 hours, unless banned.
Jail
SuperUser jail is defined by location and radius like the guest area but in effect works the opposite. Instead of containing players, it is designed to eventually let them out, hopefully rehabilitated. The /va_setjail command is used to define the jail location; the radius is set in ‘config.yml’. A player may be sent to jail from the console or as a super privileged player using ‘/jail <player> [minutes/default:10]’. The intrinsic jail command name is /va_jail, but SU responds to /jail and should override any plugin using the same command name, as well as penalize any non-super trying to use the command.
A jailed player retains his/her rank, but is relocated to jail and put and kept in survival mode until release. Jail birds, like guests, have only one command, and that is the time delayed '/ask'. It communicates only with supers. Release occurs when the term expires as defined from command, or when the jailed player leaves (escapes) the defined jail radius. A jailed player may still get system kicked if warnings are not heeded. It is assumed that a player is jailed for a reason that may involve griefing, so any work done since login is automatically rolled back upon incarceration, and again upon release or quit to restore the jail area.
Registration
SuperUser does use a non-invasive registration and login process designed to slow down hackers and provide a moderate level of security to an off-line server. Players only need to /register once, and /login only when their ip address has changed.
Commands
This Command List is directly from 'plugin.yml' and document the available commands. Player control may be done directly in the sql table. Use 'f' or '0' or 'n' for false and 't or '1', or 'y' for true. Use partial group names. Change the 'dirty' field to anything but 'false' and SuperUser will validate and implement the changes if it is for a live player. Type 'flush' in the dirty field to signal SuperUser to flush it's player cache out to database. This is designed for a user interface such as a web interface.
Command Confirm
The command confirmation I refined on my Postal plugin is employed on this plugin. This means that you only need to type enough characters of a player's name to uniquely indicate the name, and SuperUser will complete it for you. You will be given a chance to confirm it with a single'/'. SuperUser will try to uniquely complete on live players first before digging into the off-line players, unless it is a live player only command.
Stealth
The super field takes a true or false as expected, and also will accept 'stealth'. 'stealth' indicates not only super user status, but complete invisibility as well. Stealth supers do not register in the tabbed player list, nor are they announce at join, quit or death. They are not there, you see.... (actually, if you don't 'see', even better)
Player Tracker
Complementing the stealth capabilities is a powerful player tracker available only to supers. It uses the compass and a HUD reporter driven by the new Scoreboard api. Backwards compatibility is maintained by conventional messaging if the Scoreboard class is not detected. Super gets a compass needle maintaining a lock on the moving subject. The HUD reporter maintains distance and elevation statistics. There is no problem finding players with this tool. It is also good for teamwork. Two or more supers working together can maintain locks on each other so they always know exactly where each other is.
Rollback
Logblock is used to automatically rollback changes made by a player that ended up being kicked by the system or a super. Logblock also implements player settings that define whether their work is saved. For example, if a player's 'save_wrk' setting is 'false' Logblock will rollback the player's work since login when the player quits. Logblock is also used to maintain the defined jail and guest areas.
Getting Started
1) Put va_superuser.jar into your plugin folder and start the server, then stop it.
2) Edit 'config.yml' in the va_superuser directory to configure MySQL. The settings are straight forward for a normal MySQL instalation, and beyond the scope of this step description.
3) Re-start the server and enter 'va_update' at the console to populate the player table with all the players on the server. Or, have the player to be super join and quit to create just that record.
4) Use the 'rank' command from the console to make that player a super using the PEX group used for admins:
rank <player> <group> super
5) Join the game as this super and register. Go to a location where you would like new users to spawn and enter '/va_setguest'. This area is used to cool off misbehaving players as well as, used for a pre-login processing. The radius is defined in 'config.yml' and may only be edited by a super.
Comments
下载 SuperUser
下载 SuperUser
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 SuperUser
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 SuperUser
下载 SuperUser
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 SuperUser
下载 SuperUser
下载 SuperUser
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 SuperUser
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 SuperUser
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
版本 2.0
基于 Bukkit 1.7.2 编译
版本 1.7
在 Java 6、Bukkit 1.6 环境下编译
通用代码清理。
改进了消息系统的颜色可见性。
版本 1.6
此版本替换了先前发现的因 Java 优化导致类加载问题的 1.5 版本。现已修复。
版本 1.5
通用代码清理与优化。
1.1 版本
已解决超级能力者之间的可见性问题。登录时,超级能力者被错误地检测为隐身状态。
这导致了超级能力者之间以及与普通玩家之间的可见性问题。
新命令:/track <玩家/停止> 通过指南针追踪指定玩家,并在 HUD 中显示距离和高度信息。
该功能使用计分板 API。但如果 Bukkit 服务器版本过低,则会每隔几秒回退到传统的消息提示方式。仅超级用户可用。计分板
如果存在,将自动使用该配置类,但可以在 config.yml 中禁用
如果未手动停止(例如执行 '/track stop'),追踪器将在 10
分钟后自动关闭。此外,该追踪器还
如果目标玩家移动到其他维度,或者
任何一方退出游戏,则停止。
版本 1.0
为常用命令设置了别名,详见
plugin.yml
修复了重复提示的问题,消除了多余且过时的提示。
/goto 命令已完成。
/get 命令已完成。
修复了常规操作导致新加入游戏的玩家完全无法看见隐身者的问题,该问题还引发了包括普通玩家在内的普遍可见性问题。现已修复。
/password 命令已完成。同时适用于玩家和控制台
版本 0.05
监狱区域,由位置和半径定义,与访客区域类似,对所有用户(除超级用户外)只读。
新增命令 va_undo <玩家> [分钟数 默认值:last_login] 和 va_redo <玩家> [分钟数 默认值:last_login] 可撤销 Logblock 回滚的效果。仅限超级用户使用。
将玩家排名下调会触发 Logblock 回滚,从该
玩家加入当前会话时起的所有操作都将被还原。此
机制假定玩家降级是有原因的。
牢狱指令,控制台和玩家端均已完成,以及
使用它所需的基础设施。
成功服完刑期会清除违规计数。
防止对已安装的超级模组进行客串或关押的安全机制。
当玩家重新加入游戏时,将其放置在地面上(如果正在飞行)。
将违规报告速率降至最多每两秒一次。热情的玩家可能在
一秒钟内累积足够的警告而被踢出,否则不会。
修复了因未设置访客位置而导致的问题。该问题源于 config.yml 中的临时位置配置假定 world,0,127,0 是安全的,但并非所有系统都存在 'world' 维度,且该位置并不总是安全的。现在,登录时会捕获自然出生点,并将其用作临时访客位置,直到由超级用户正式定义新位置。
版本 0.04
已实现 PERMIT 命令,支持控制台和玩家使用。
/permit(不带参数)列出所有权限名称。
/permit <玩家> 列出指定玩家的彩色编码设置。
/permit <玩家> <权限名> y/n 设置该权限。
此命令以及其他玩家管理命令可用于在线或离线玩家。设置会立即生效。如果你在对飞行中的在线玩家关闭飞行模式,该玩家将从空中坠落。
与所有 SuperUser 命令一样,只需输入最少的字符即可。
在可能的情况下,SU 会自动补全参数,并在执行前提供一个确认步骤。
此命令可完成管理 SuperUser 插件所需的所有细节,无需借助表编辑器。因此,尽管 SQL 表可能是该插件的最佳功能,但直接操作它是可选的。
版本 0.03
修复了 /va_reload 命令
将 /reset 命令使用的值移至 config.yml 配置文件
创建了一个示例 pex permissions.yml 文件
扩展了 /rank 命令,使其使用 PEX 组中定义的节点设置来设定玩家记录的详细信息。这些详细信息现在会根据每个 PEX 组的定义自动设置。
版本 0.02
修复了 we_ok 字段设置错误的问题。
Rank 命令执行完毕,玩家和控制台均已完成。格式略有更改为:
/rank <玩家> <组别> [super/stealth]
版本 0.01
首次发布。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
ExyliaPlugins 的库。
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
插件
创建用户友好的菜单以前往不同的世界
插件
专为 Velocity 打造的自制聊天插件,功能丰富——支持跨服群组/全局/私聊消息,并集成 LibertyBans 的禁言功能。
插件
一个高度兼容、功能完善且稳定的 TPA 模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧