AntiGuest
描述
AntiGuest 可阻止玩家执行某些可能被用于恶意破坏(griefing)的行为,例如建造和战斗。
每项限制都有各自的可配置消息,该消息将显示给玩家。此消息支持颜色代码(&0, &1, ..., &e, &f, &k)。
工作原理
AntiGuest 使用权限系统来判断玩家是否允许执行特定操作。
因此,你应当(非强制要求,但推荐)与 AntiGuest 一起安装一个权限管理器,如 bPermissions 或 GroupManager。
通常你只希望防止访客执行诸如破坏和放置方块(即恶意破坏)等行为,
因此你应该 不要 给予访客所在组执行这些操作的权限。
然而,你的正式玩家应该能够执行这些操作。
可以通过向玩家或其所在组添加权限 "antiguest.preventions.*" 或特定操作的权限来实现这一点。
正如你可能看到的,该系统不仅仅支持“访客什么都不能做,成员什么都可以做”。
例如,你可以分层设置权限,如“访客除了聊天外什么都不能做;旅行者可以聊天、放置和破坏方块;成员拥有所有权限”,
甚至可以更复杂的设置,完全由你决定。
注意!常见错误的提示
- 自 3.0 版本起,所有限制默认禁用(3.2 版本对此进行了更改,见下表)
- 自 3.1 版本起,每种限制都有自己的配置文件,从 3.2 版本开始旧配置将被转换
- 权限名称均为小写,在报告 AntiGuest 无效之前请检查这一点
限制项
| 名称 | 禁止 ... | 默认启用 | 可过滤 | 可惩罚 | 可记录 |
| ad | 发布服务器地址(同时启用 link,见下文) | 是 | 否 | 是 | 是 |
| afk | 通过踢出长时间闲置的玩家来防止挂机 | 否 | 否 | 否 | 是 |
| anvil | 使用铁砧 | 否 | 否 | 是 | 是 |
| beacon | 打开信标界面 | 是 | 否 | 是 | 是 |
| bed | 睡觉 | 否 | 否 | 是 | 是 |
| bow | 射击弓 | 是 | 否 | 是 | 是 |
| breakblock | 破坏方块 | 是 | 是 | 是 | 是 |
| brew | 酿造 | 否 | 否 | 是 | 是 |
| button | 按下按钮 | 否 | 否 | 是 | 是 |
| cake | 吃蛋糕 | 否 | 否 | 是 | 是 |
| caps | 发送全大写消息 | 否 | 否 | 是 | 是 |
| changesign | 修改告示牌 | 是 | 否 | 是 | 是 |
| chat | 聊天 | 否 | 否 | 是 | 是 |
| chest | 访问箱子 | 是 | 否 | 是 | 是 |
| command | 使用特定命令 | 否 | 是 | 是 | 是 |
| damage | 受到伤害 | 否 | 是 | 否 | 否 |
| dispenser | 访问发射器 | 是 | 否 | 是 | 是 |
| door | 打开或关闭门(包括栅栏门) | 是 | 是 | 是 | 是 |
| dropper | 打开投掷器界面 | 是 | 否 | 是 | 是 |
| drop | 丢弃特定物品 | 否 | 是 | 是 | 是 |
| enchant | 访问附魔台 | 否 | 否 | 是 | 是 |
| fight | 伤害其他玩家 | 是 | 否 | 是 | 是 |
| fish | 钓鱼 | 否 | 否 | 是 | 是 |
| furnace | 访问熔炉 | 否 | 否 | 是 | 是 |
| guestlimit | 访客数量过多 | 否 | 否 | 否 | 否 |
| hopper | 打开漏斗界面 | 是 | 否 | 是 | 是 |
| horse | 与马/骡子/驴交互 | 否 | 否 | 是 | 是 |
| hotbar | 更改快捷栏选中槽位 | 否 | 否 | 是 | 是 |
| hunger | 饥饿 | 是 | 否 | 否 | 否 |
| itemframe | 更改物品展示框 | 是 | 否 | 是 | 是 |
| item | 使用特定物品 | 否 | 是 | 是 | 是 |
| jukebox | 使用唱片机 | 否 | 否 | 是 | 是 |
| lavabucket | 使用岩浆桶 | 是 | 否 | 是 | 是 |
| lead | 使用拴绳 | 否 | 否 | 是 | 是 |
| lever | 使用拉杆 | 否 | 否 | 是 | 是 |
| link | 发布可点击链接 | 是 | 否 | 是 | 是 |
| milking | 挤牛奶 | 否 | 否 | 是 | 是 |
| monster | 被怪物锁定目标 | 是 | 是 | 是 | 否 |
| move | 移动过远 | 是 | 否 | 是 | 否 |
| noteblock | 使用音符盒 | 否 | 否 | 是 | 是 |
| pickup | 拾取特定物品 | 否 | 是 | 否 | 否 |
| placeblock | 放置方块 | 是 | 是 | 是 | 是 |
| pressureplate | 触发压力板 | 否 | 否 | 是 | 是 |
| repeater | 更改中继器延迟 | 否 | 否 | 是 | 是 |
| shear | 剪羊毛(对动物进行剪切) | 否 | 否 | 是 | 是 |
| sneak | 潜行(隐藏头顶的名字) | 否 | 否 | 是 | 是 |
| spam | 刷屏 | 是 | 否 | 是 | 是 |
| spawnegg | 使用刷怪蛋 | 否 | 是 | 是 | 是 |
| swear | 说脏话 | 是 | 否 | 是 | 是 |
| tame | 驯服动物 | 否 | 否 | 是 | 是 |
| trading | 与村民交易 | 否 | 否 | 是 | 是 |
| trample | 踩踏农作物 | 否 | 否 | 是 | 是 |
| tripwire | 触发绊线 | 是 | 否 | 是 | 是 |
| vehicle | 使用载具(进入、放置、破坏、推动) | 否 | 否 | 是 | 是 |
| waterbucket | 使用水桶 | 是 | 否 | 是 | 是 |
| workbench | 访问工作台 | 否 | 否 | 是 | 是 |
过滤机制
过滤机制是如何工作的?
过滤功能允许你筛选将被阻止的行为。
例如,命令阻止功能可以阻止所有命令的使用,或者基于白名单或黑名单仅阻止特定的一组命令。
过滤配置
- mode(模式):
- none(无):阻止一切(别名:-1, nolist, all)
- whitelist(白名单):列出的条目不被阻止(别名:0, white)
- blacklist(黑名单):仅阻止列出的条目(别名:1, black)
- list(列表):
- 条目列表。这可能是命令、物品名称或其他内容,具体取决于阻止功能的作用对象
- 如果 mode 设置为 none,此列表将被忽略
惩罚措施
自版本 3.3 起,AntiGuest 允许自动惩罚玩家。
这些惩罚措施可按每种阻止类型单独配置。
你可以为每次违规指定多个惩罚措施,你可以在配置文件中查看默认的惩罚值。
| 惩罚措施 | 描述 | 配置项 |
| ban | 封禁玩家 | reason: 封禁原因 |
| burn | 将玩家点燃 | duration: 燃烧持续时间(秒) |
| dropitem | 掉落手中持有的物品 | pickupDelay: 拾取延迟时间(秒) |
| explosion | 制造虚假爆炸并造成伤害 | damage: 造成的伤害值 |
| kick | 踢出玩家 | reason: 踢出原因 |
| kill | 杀死玩家 | 无 |
| lightning | 在玩家身上降下虚假闪电 | damage: 造成的伤害值 |
| message | 强制玩家发送一条尴尬的消息 | message: 要发送的消息内容 |
| potion | 使玩家中毒 | duration: 效果持续时间,effect: 效果类型 |
| rocket | 将玩家射向空中 | height: 高度(方块数) |
| slap | 扇玩家耳光 | damage: 造成的伤害值 |
| starvation | 让玩家饥饿至死 | 无 |
未指定配置项以 {} 表示
命令
通用语法:/antiguest <command> 或 /ag <command>
| 命令 | 描述 |
| help | 显示帮助文本 |
| can [player] <preventionname> | 检查玩家(或另一名玩家)是否通过了某项阻止检测 |
| list [-a] | 列出当前激活或所有已注册的阻止规则 |
| reload [prevention] | 重载插件 |
| setmessage <prevention> <message> | 设置某项阻止规则的提示消息 |
| language [language] | 显示或设置语言 |
| badword <word> | 将脏词添加到脏话阻止规则中 |
disable <prevention|*> [-t] | 禁用特定的阻止规则或一次性禁用所有规则 |
enable <prevention|*> [-t] | 启用特定的阻止规则或一次性启用所有规则 |
| reset | 重置所有配置 |
安装
AntiGuest 3 至少需要 Bukkit 1.1-R5!
步骤
- 只需将 AntiGuest Jar 文件放入你的 plugins 文件夹中
- 如果你是从旧版本升级,可能需要删除配置文件以获得全新的默认配置
- 重启/重载你的服务器
- 一旦插件启用,配置文件将会生成/更新
权限
| 权限节点 | 描述 | 默认值 |
| antiguest.violation-notification | 玩家将收到违规通知 | 未分配 |
| antiguest.* | 允许玩家执行所有操作 | 管理员 (operators) |
| antiguest.commands.* | 允许玩家运行所有命令 | 管理员 (operators) |
| antiguest.commands.<command> | 允许玩家运行特定命令 | 管理员 (operators) |
| antiguest.preventions.* | 允许玩家绕过所有限制措施 | 管理员 |
| antiguest.preventions.<prevention> | 允许玩家绕过特定的限制措施 | 管理员 |
基础配置
| 条目 | 默认值 | 描述 |
| debug | false | 启用或禁用调试输出 |
| language | system value | 设置所有文本的语言 |
| punishments | true | 全局启用或禁用惩罚机制 |
| log-violations | false | 全局启用违规日志记录 |
| prevent-npc | false | 为 NPC 启用限制措施 |
开发者说明
插件由 Quick_Wango 开发 - Cube Island
- 想要新功能?
- 希望插件始终保持最新?
- 需要良好的技术支持?
我完全是出于个人兴趣,在业余时间无偿进行开发。如果您能捐赠少量金额以支付我的账单,这将极大激励我继续维护插件。
提前感谢您的支持!
联系开发者(EsperNet 上的 #cubeisland-dev 频道)
GitHub 源代码
AntiGuest
Description
AntiGuest prevents players from doing specific things like building and fighting, which can be used to grief.
Every prevention has its own configurable message which will be printed to the player. This message supports color codes (&0, &1, ..., &e, &f, &k)
How does this work?
AntiGuest uses permissions to determine whether a player is allowed to do a specific action.
So you should (not necessarily needed, but recommended) install a permission manager like bPermissions or GroupManager along with AntiGuest.
Usually you only want to prevent your guests from doing things like breaking and placing blocks (griefing),
so you should not give your guests' group the permission to do so.
However your accepted players should by able to do these actions.
That can be achieved by adding the permission "antiguest.preventions.*" or a action specific permission to the player or his group.
As you might see, this system allows more than just "guests can nothing, members everything".
You could for example stagger the permissions like "guests can nothing but chat; trails can chat, place and break blocks; members can everything"
and even more complex setups, it's completely up to you.
Watch out! Tips for common mistakes
- All preventions are disabled by default since version 3.0 (3.2 changes that, see the table below)
- All preventions have their own configuration file since 3.1, since 3.2 the old configurations will be converted
- The permissions are all lowercase, check that before you report AntiGuest not working
Preventions
| Name | Prevents from ... | On by default | Filterable | Punishable | Loggable |
| ad | posting server addresses (also enables link, see below) | yes | no | yes | yes |
| afk | idling players by kicking them after a configured time | no | no | no | yes |
| anvil | using anvils | no | no | yes | yes |
| beacon | opening beacon inventories | yes | no | yes | yes |
| bed | sleeping | no | no | yes | yes |
| bow | shooting bows | yes | no | yes | yes |
| breakblock | breaking blocks | yes | yes | yes | yes |
| brew | brewing | no | no | yes | yes |
| button | pushing buttons | no | no | yes | yes |
| cake | eating cakes | no | no | yes | yes |
| caps | writing all-caps messages | no | no | yes | yes |
| changesign | changing signs | yes | no | yes | yes |
| chat | chatting | no | no | yes | yes |
| chest | accessing chests | yes | no | yes | yes |
| command | using specific commands | no | yes | yes | yes |
| damage | getting damaged | no | yes | no | no |
| dispenser | accessing dispensers | yes | no | yes | yes |
| door | opening or closing doors (including fence gates) | yes | yes | yes | yes |
| dropper | opening dropper inventories | yes | no | yes | yes |
| drop | dropping specific items | no | yes | yes | yes |
| enchant | accessing enchantment tables | no | no | yes | yes |
| fight | damaging other players | yes | no | yes | yes |
| fish | fishing | no | no | yes | yes |
| furnace | accessing furnaces | no | no | yes | yes |
| guestlimit | getting too many guests | no | no | no | no |
| hopper | opening hopper inventories | yes | no | yes | yes |
| horse | interacting with horses/mules/donkeys | no | no | yes | yes |
| hotbar | changing the selected hotbar slot | no | no | yes | yes |
| hunger | starvation | yes | no | no | no |
| itemframe | changing item frames | yes | no | yes | yes |
| item | using specific items | no | yes | yes | yes |
| jukebox | using jukeboxes | no | no | yes | yes |
| lavabucket | using lava buckets | yes | no | yes | yes |
| lead | using a leash | no | no | yes | yes |
| lever | using levers | no | no | yes | yes |
| link | posting clickable links | yes | no | yes | yes |
| milking | milking cows | no | no | yes | yes |
| monster | getting targeted by monsters | yes | yes | yes | no |
| move | moving too far | yes | no | yes | no |
| noteblock | using note blocks | no | no | yes | yes |
| pickup | picking up specific items | no | yes | no | no |
| placeblock | placing blocks | yes | yes | yes | yes |
| pressureplate | triggering pressure plates | no | no | yes | yes |
| repeater | changing the repeater delays | no | no | yes | yes |
| shear | shearing animals | no | no | yes | yes |
| sneak | sneaking (hiding the name above his head) | no | no | yes | yes |
| spam | spam | yes | no | yes | yes |
| spawnegg | using spawn eggs | no | yes | yes | yes |
| swear | swearing | yes | no | yes | yes |
| tame | taming animals | no | no | yes | yes |
| trading | trading with villagers | no | no | yes | yes |
| trample | trampling crops | no | no | yes | yes |
| tripwire | triggering trip wires | yes | no | yes | yes |
| vehicle | using vehicles (entering, placing, destroying, pushing) | no | no | yes | yes |
| waterbucket | using water buckets | yes | no | yes | yes |
| workbench | accessing workbenches | no | no | yes | yes |
Filtering
How does filtering work?
Filtered prevention allow you to filter the action which will be prevented.
For example the command preventions which can either prevent the usage of all commands or just a specific set of commands based on a whitelist or blacklist
Filter configuration
- mode:
- none: everything will be prevented (aliases: -1, nolist, all)
- whitelist: the listed entries are NOT prevented (aliases: 0, white)
- blacklist: only the listed entries will be prevented (aliases: 1, black)
- list:
- the list of entries. this might be commands, item names or anything else depending on what the prevention does
- this list will be ignored if the mode is set to none
Punishments
Since version 3.3, AntiGuest allows to automatically punish players.
These punishments are configurable per prevention.
You can specify multiple punishments per violation, you can look at the default punishment values in the configs
| Punishment | Description | Configuration |
| ban | Bans the player | reason: the ban reason |
| burn | Sets the player on fire | duration: the burn duration in seconds |
| dropitem | Drops the held item | pickupDelay: the pickup delay in seconds |
| explosion | Creates a fake explosion and damages | damage: the damage to deal |
| kick | Kicks the player | reason: the kick reason |
| kill | Kills the player | none |
| lightning | Strikes a fake lightning on the player | damage: the damage to deal |
| message | Makes the player send an awkward message | message: the message to send |
| potion | Poisons the player | duration: effect duration, effect: type |
| rocket | Shoots the player in the air | height: the number of blocks |
| slap | Slaps the player | damage: the damage to deal |
| starvation | Lets the player starve | none |
No configuration is specified as {}
Commands
General syntax: /antiguest <command> or /ag <command>
| Command | Description |
| help | prints a help text |
| can [player] <preventionname> | checks whether the player (or another player) passes a prevention |
| list [-a] | lists the active or all registered preventions |
| reload [prevention] | reloads the plugin |
| setmessage <prevention> <message> | sets the message of a prevention |
| language [language] | shows or sets the language |
| badword <word> | adds a bad word to the swear prevention |
disable <prevention|*> [-t] | disables a specific prevention or all at once |
enable <prevention|*> [-t] | enables a specific prevention or all at once |
| reset | resets all configurations |
Installation
AntiGuest 3 needs at least Bukkit 1.1-R5!
Steps
- Just put the AntiGuest Jar-File into your plugins folder
- If you're upgrading from an older version you might remove your config to get a fresh one
- restart/reload your server
- The configuration files will be generated/updated as soon as the plugin gets enabled
Permissions
| Permission node | Description | Default |
| antiguest,violation-notification | The player will receive violation notifications | not assigned |
| antiguest.* | Allows the player to do everything | operators |
| antiguest.commands.* | Allows the player to run all commands | operators |
| antiguest.commands.<command> | Allows the player to run the specific command | operators |
| antiguest.preventions.* | Allows the player to pass all preventions | operators |
| antiguest.preventions.<prevention> | Allows the player to pass the specific prevention | operators |
Base configuration
| Entry | Default value | Description |
| debug | false | Enables or disables debug output |
| language | system value | Sets the language of all texts |
| punishments | true | Globally disables or enables punishing |
| log-violations | false | Globally enables violation logging |
| prevent-npc | false | Enables the preventions for NPCs |
Developer Notice
Plugin developed by Quick_Wango - Cube Island
- You want new features?
- You want the plugin to be always up to date?
- You want good support?
I'm doing this for literally nothing in my free time, so keep me interested in my plugins and help pay my bills by simply donating a few bucks.
Thanks in advance!
Talk to the developers (#cubeisland-dev on EsperNet)
Source on Github
评论 0
登录后参与评分
还没有评论,来抢沙发吧