SmartBans v1.0.2
简介
此插件提供 100% 可自定义的封禁提示信息,请查看下方的示例封禁消息!
当你封禁或临时封禁玩家时,它会记录他们的名字、执行封禁的人、封禁原因以及封禁时长。该插件使用 UUID 进行封禁,因此你无需担心玩家通过更改用户名来规避封禁。
示例封禁消息:
安装
要安装此插件,只需下载它并将其放入服务器上的 plugins 文件夹中。之后重启服务器以生成相关文件。
配置
本节将提供有关配置文件中每个选项功能的更多信息。
- already-banned | 当发送者尝试封禁一个已被封禁的玩家时,发送给发送者的提示消息
- ban-check-message | 当发送者输入 /check <player> 时显示的提示消息。
- ban-exempt | 当发送者尝试封禁拥有权限节点 smartbans.exempt 且发送者自身不具有权限节点 smartbans.override 的玩家时,发送给发送者的提示消息。
- ban-message | 玩家被封禁时,或他们尝试加入服务器但因仍处于封禁状态而被拒绝时,显示给被封禁玩家的提示消息。
- default-perm | 如果玩家被永久封禁,将在封禁时长处显示的提示消息。
- default-reason | 如果未指定封禁原因,将显示的提示消息。
- expired-ban | 如果玩家的临时封禁到期,此消息将显示在 prev-banned.yml 文件的 unbanned-by(解封人)部分中。
- no-time | 如果玩家被判处 0 天/0 小时等零时长封禁,将显示此消息而非留空。
- player-not-found | 如果指定的用户名不存在,此消息将显示给发送者。
- player-not-banned | 当发送者尝试解封一名玩家或检查一名未被封禁的玩家时,此消息将显示给他们。
- perm-banned-notif | 当玩家被永久封禁时,向拥有权限节点 smartbans.notify 的玩家显示的聊天通知
- temp-banned-notif | 当玩家被临时封禁时,向拥有权限节点 smartbans.notify 的玩家显示的聊天通知
- unban-notif | 当玩家被解封时,向拥有权限节点 smartbans.notify 的玩家显示的聊天通知
变量
使用方法
你可以在 config.yml 中使用变量,它们将被替换为其他内容。例如 %player% 将被替换为玩家的名字。以下是变量列表及其用法
- %player% | 由玩家的名字替换。将是目标玩家,而非发送者。
- %NL% | 开始新行。
- %banned-by% | 由执行封禁的目标玩家的名字替换(如果是控制台执行的封禁,则显示 CONSOLE)。
- %ban-length% | 封禁剩余的时间量。
- %reason% | 封禁原因。
- %unbanned-by% | 由执行解封的目标玩家的名字替换(如果是控制台执行的解封,则显示 CONSOLE)。
使用位置
某些变量与特定的字符串配合使用。如下所示。
- %player% | already-banned, ban-check-message, ban-exempt, player-not-found, player-not-banned, perm-banned-notif, temp-banned-notif, unban-notif
- %NL% | ban-check-message, ban-message, perm-banned-notif, temp-banned-notif, unban-notif
- %banned-by% | ban-check-message, ban-message, perm-banned-notif, temp-banned-notif
- %ban-length% | ban-check-message, ban-message, perm-banned-notif, temp-banned-notif, unban-notif
- %reason% | ban-check-message, ban-message, perm-banned-notif, temp-banned-notif
- %unbanned-by% | unban-notif
权限
- smartbans.ban | 授予 /ban 命令的使用权限。
- smartbans.check | 允许用户查看被封禁玩家的详细信息(原因、谁执行的封禁、封禁时长)。
- smartbans.exempt | 免于被禁,通常将此权限给予工作人员。
- smartbans.notify | 当有人被禁/tempbanned 时在聊天中接收通知。
- smartbans.override | 允许你封禁拥有权限节点 smartbans.exempt 的玩家。这通常保留给 OP 玩家、高级管理员等。
- smartbans.tempban | 授予 /tempban 命令的使用权限。
- smartbans.unban | 授予 /unban 命令的使用权限。
命令用法
- /ban <player> <reason> | 你可以封禁一名玩家并指定原因。如果未输入原因,它将使用配置中的默认原因。
- /check <player> | 显示玩家被封禁的原因、执行封禁的人以及封禁时长。
- /tempban <玩家> <时长> <原因> | 与 /ban 类似。<时长> 允许你指定天数、小时数、分钟数和秒数,并用逗号分隔。示例:/tempban oceantheskatr 2d,3h,1m,20s Making a cool plugin! 这将临时封禁 "oceantheskatr" 2 天 3 小时 1 分钟 20 秒,封禁原因为 "Making a cool plugin!"
- /unban <玩家> | 解封玩家。他们将从封禁列表移至已封禁历史列表。这会保存所有以往的封禁记录,以便你查看某玩家是否曾被封禁。它还会记录执行解封操作的人,以及封禁原因、时长和最初执行封禁的人。
当前功能
- 完全可自定义的提示消息,用于显示当被封禁的玩家尝试加入服务器时的信息。
- 基于 UUID 的封禁
- 可以封禁任何你想要的玩家,即使他们从未加入过你的服务器!
- 存储封禁原因、封禁时长以及执行封禁操作的人。
计划中的功能
- /banlist:在 GUI 中以可视化形式展示被封禁的玩家列表
欢迎提出建议!
捐赠
如果你喜欢我的作品并想支持我的工作,这是我的 PayPal 捐赠链接: :)
更新日志
请查看下载页面以获取最新的更新日志!
-
如果遇到任何错误,请提交工单或直接私信我,而不是留下负面评论 :)
SmartBans v1.0.2
Introduction
This plugin offers a 100% customizable message for banned players, check out the example ban message below!
When you ban or temporarily ban player, it will store their name, who banned them, the ban reason, and how long they're banned. This uses UUIDs for banning so you don' t have to worry about players changing their username to dodge the ban.
Example ban message:
Installation
To install this plugin, simply download it and put it in the plugins folder on your server. After that, restart it to generate the files.
Configuration
This section will provide more information on what each option in the config does.
- already-banned | The message that displays to the sender when they try to ban a player that is already banned
- ban-check-message | The message that is displayed when the sender types /check <player>.
- ban-exempt | The message that is displayed when the sender tries to ban a player that has the permission nodesmartbans.exempt AND the sender does NOT have the permission node smartbans.override.
- ban-message | The message shown to the banned player when they are banned, or when they try to join the server and are still banned.
- default-perm | The message that will show in ban length if the player is permanently banned.
- default-reason | The message that will show if a ban reason isn't specified.
- expired-ban | If a player's temp ban expires it will show this message in the unbanned-by section in the prev-banned.yml file.
- no-time | If a player is banned for 0d/0h/etc it will say this instead of being blank.
- player-not-found | If the specified username doesn't exist this message will be displayed to the sender.
- player-not-banned | When the sender either tries to unban a player or checks a player that isn't banned, this message will be displayed to them.
- perm-banned-notif | The notification shown in chat when a player is permanently banned to players that have the permission node smartbans.notify
- temp-banned-notif | The notification shown in chat when a player is temporarily banned to players that have the permission node smartbans.notify
- unban-notif | The notification shown in chat when a player is unbanned to players that have the permission node smartbans.notify
Variables
How to use
You can use variables in the config.yml and they will be replaced with other things. An example would be %player% would be replaced with a player's name. Below is a list of variables and how they are used
- %player% | Replaced by player's name. Will be the target player, not the sender.
- %NL% | Starts new line.
- %banned-by% | Replaced by name of player who banned the target player (Will say CONSOLE if banned by console).
- %ban-length% | Amount of time remaining on ban.
- %reason% | Reason for ban.
- %unbanned-by% | Replaced by name of player who unbanned the target player (Will say CONSOLE if unbanned by console).
Where to use
Certain variables work with certain strings. This is shown below.
- %player% | already-banned, ban-check-message, ban-exempt, player-not-found, player-not-banned, perm-banned-notif, temp-banned-notif, unban-notif
- %NL% | ban-check-message, ban-message, perm-banned-notif, temp-banned-notif, unban-notif
- %banned-by% | ban-check-message, ban-message, perm-banned-notif, temp-banned-notif
- %ban-length% | ban-check-message, ban-message, perm-banned-notif, temp-banned-notif, unban-notif
- %reason% | ban-check-message, ban-message, perm-banned-notif, temp-banned-notif
- %unbanned-by% | unban-notif
Permissions
- smartbans.ban | Gives access to the command /ban.
- smartbans.check | Allows user to check the details of banned players (reason, who banned them, length of ban).
- smartbans.exempt | Exempt from being banned, generally give this to staff members.
- smartbans.notify | Be notified in chat when someone is banned/tempbanned.
- smartbans.override | Allows you to ban players that have the permission node smartbans.exempt. This would generally be kept for OP'ed players, head admins, etc.
- smartbans.tempban | Gives access to the command /tempban.
- smartbans.unban | Gives access to the command /unban.
Command Usage
- /ban <player> <reason> | You can ban a player and specify the reason. If no reason is entered, it will use the default one from the config.
- /check <player> | Shows reason player was banned, who banned them, and how long they're banned for.
- /tempban <player> <length> <reason> | Similar to /ban. The <length> allows you to specify days, hours, minutes, and seconds separated by a comma. Here's an example: /tempban oceantheskatr 2d,3h,1m,20s Making a cool plugin! This would temporarily ban "oceantheskatr" for 2 days, 3 hours, 1 minute, and 20 seconds with the reason "Making a cool plugin!"
- /unban <player> | Unban players. they will be moved from the ban list to the previously-banned list. This stores all previous bans so that you are able to see if a player has been banned before. It will also add who unbanned them in addition to the ban reason, length, and who banned them.
Current Features
- 100% customizable message for players that try joining when they're banned.
- UUID-based bans
- Ban any player you want, even if they've never joined your server!
- Store the ban reason, ban length, and who banned the player.
Planned Features
- /banlist to have a visual representation of banned players in a GUI
Requests are welcome!
Donations
If you like my work and want to support what I do, this is my PayPal donation link: :)
Changelog
View download page for an up-to-date changelog!
-
If you run in to any errors, please submit a ticket or direct message me instead of leaving a negative comment :)
评论 0
登录后参与评分
还没有评论,来抢沙发吧