MessageChangerLite
此插件在较新的构建版本中仍应能正常工作,因此在提问前请先尝试一下。
这是一个简单的插件,允许你将服务器在登录、登出、服务器停机、踢出、服务器已满等时刻显示的默认消息更改为你想要的任何内容。
如果你希望获得当面协助,你可以在 IRC 上找到我,昵称是 Zach443 在这里。
功能
- 更改服务器的默认消息
- 当玩家切换世界时向其显示一条消息
- 集成 Metrics 以便我知道这样做是值得的。
基于 FrozenBrains 的 MessageChanger。
配置
首次运行时会在 plugins/MessageChangerLite 目录下生成一个 config.yml 文件。按喜好编辑消息,然后重启或重载服务器使其生效。
%pName 是玩家名称
%world 是世界名称
%msg 是默认消息
你可以使用来自 这里的颜色代码
示例配置文件中已经包含了 2 个权限节点,用于根据权限显示自定义消息。
如果像 SERVER_FULL 这样的事件不存在(例如在 permnode1 中),插件将回退到在 default 部分配置的消息。
权限
查看示例/默认配置:
- permnode1 对应 messagechanger.message.permnode1
- permnode2 对应 messagechanger.message.permnode2
当然,你可以随意命名 permnode1 和 permnode2。
注意:权限将根据 categoryOrder 配置节点进行解析。
一旦插件找到一个权限,它就会尝试该类别;如果在该类别中未找到消息,它将回退到默认值!
示例配置
# MessageChangerLite 2.0 by [Don Redhorse] # # MessageChangerLite 配置文件。 # # 如需详细帮助,请访问:#------- 默认配置
# 配置版本 configVer: '2.0'
# 错误日志启用 # 启用记录到服务器控制台 # Warning 和 Severe 级别仍将记录。 errorLogEnabled: true
# 调试日志启用 # 启用更多日志记录……可能会很混乱! DebugLogEnabled: false
# 检查更新 # 将检查是否有新版本的插件发布。 checkForUpdate: true
# 自动更新配置 # 这将覆盖配置参数之外的任何更改! autoUpdateConfig: false
# 保存配置 # 这将覆盖配置参数之外的任何更改! # 仅当你使用游戏内命令更改配置时才需要。 saveConfig: false
#-------- 插件配置
# 你可以使用以下变量: # %pName = 玩家的显示名称 # %world = 玩家所在的世界 # %msg = 默认消息
# 类别解析的顺序 categoryOrder: [permnode1, permnode2]
message-category: default: KICK_FULL: '%msg' SERVER_STOP: 'Testingtheserver...' KICK_WHITELIST: '%msg' PLAYER_QUIT: '%msg' KICK_KICK_LEAVEMSG: '%msg' KICK_KICK_REASON: '%msg' PLAYER_JOIN: 'Hello&b%pName&finworld%world' CHANGED_WORLD: "Welcometravelerfrom%fromWorldin%world" KICK_BANNED: '%msg' permnode1: SERVER_STOP: 'Ohwell...' permnode2: PLAYER_JOIN: 'Welcometheadmin'
常见问题解答(FAQ)
- 问:加入和离开消息不生效,其他功能正常。
答:你需要在 AdminCMD 中关闭加入/离开消息。 - 问:权限节点显示奇怪的结果,为什么?
答:我会解析 categoryOrder 中的权限节点,但如果某个权限节点没有配置消息,我将回退到默认值。
因此,我不会检查超过一个以上的权限节点!
待办事项(ToDo)
- 在评论区留下任何请求 :)
更新日志
V2.10
- 修复了当部分默认消息缺失时出现的空指针异常(NPE)
V 2.9
- 内部增加了消息变更器的权限检查,唉……
V 2.8
- 修复了与指标统计(metrics)相关的一些问题
V 2.7
- 修复了由 Bukkit 引入的另一个 bug
V 2.6
- 修复了一个因 Bukkit 问题导致服务器崩溃的问题
V 2.5
- 添加了 Metrics 更多信息及退出选项
V 2.4
- 适配 1.1 R5
V 2.3
- 添加了 categoryOrder 配置节点,用于确定消息类别的处理顺序。
你不需要包含默认类别,它默认会最后处理!
如果你让配置文件自动更新,请移除你不想要的默认类别!
V 2.2
- 添加了玩家切换世界时显示的消息
V 2.0
- 为消息添加了权限支持
- 添加了日志和配置类
- 可更新的配置文件
- 版本更新检查
v 1.2
添加了 %world 变量
v 1.1
DisplayName 被用作玩家名称
v 1.0
初始发布
源代码
MessageChangerLite
This plugin should be still working on newer builds, so please try before asking.
A simple plugin which allows you to change the server's default messages which will be displayed during login, logoff, server down, kick, server full and more to whatever you want.
If you would like assistance in person, you can find me in IRC as Zach443 here.
Features
- Change the server's default messages
- Display a message to the player when he changes worlds
- Implements Metrics so that I know it is worth doing this.
Based upon FrozenBrains MessageChanger.
Configuration
Will create a config.yml file on first run in the plugins/MessageChangerLite directory. Edit the messages as you like and restart or reload the server to make them active.
%pName is the playername
%world is the worldname
%msg is the default mesage
You can use colorcodes from here
The example config contains already 2 permission nodes for displaying custom messages based on permissions.
If the EVENT like SERVER_FULL doesn't exist, for example in permnode1 the plugin will fall back to the messages configured in the default section.
Permissions
Looking at the sample / default config:
- permnode1 is messagechanger.message.permnode1
- permnode2 is messagechanger.message.permnode2
Of course you can call permnode1 and permnode2 whatever you like.
NOTE: Permissions will be parsed based on the categoryOrder config node.
As soon as the plugin finds a permission it will try that category, if it doesn't find a message than it will fall back to the default!
Sample Config
# MessageChangerLite 2.0 by [Don Redhorse] # # Configuration File for MessageChangerLite. # # For detailed assistance please visit:#------- Default Configuration
# Configuration Version configVer: '2.0'
# Error Log Enabled # Enable logging to server console # Warning and Severe will still be logged. errorLogEnabled: true
# Debug Log Enabled # Enable more logging.. could be messy! DebugLogEnabled: false
# Check for Update # Will check if there is a new version of the plugin out. checkForUpdate: true
# Auto Update Config # This will overwrite any changes outside the configuration parameters! autoUpdateConfig: false
# Save Config # This will overwrite any changes outside the configuration parameters! # Only needed if you use ingame commands to change the configuration. saveConfig: false
#-------- Plugin Configuration
# You can use the following variables: # %pName = DisplayName of the Player # %world = World the player is in # %msg = default message
# Order in which the categories are parsed categoryOrder: [permnode1, permnode2]
message-category: default: KICK_FULL: '%msg' SERVER_STOP: 'Testingtheserver...' KICK_WHITELIST: '%msg' PLAYER_QUIT: '%msg' KICK_KICK_LEAVEMSG: '%msg' KICK_KICK_REASON: '%msg' PLAYER_JOIN: 'Hello&b%pName&finworld%world' CHANGED_WORLD: "Welcometravelerfrom%fromWorldin%world" KICK_BANNED: '%msg' permnode1: SERVER_STOP: 'Ohwell...' permnode2: PLAYER_JOIN: 'Welcometheadmin'
FAQ
- Q: Join and Leave messages are not working, the rest is.
A: You need to turn off Join / Leave messages in AdminCMD - Q: I see strange results with the permission nodes. Why?
A: I do parse the permission nodes in the categoryOrder, but I fall back to default if a permission node doesn't have a message.
So I don't check for more than ONE permission node!
ToDo
- Post any requests in the comments :)
Changelog
V2.10
- fixed an NPE if some of the default messages where missing
V 2.9
- added permissions check for messagechanger internally, sigh..
V 2.8
- fixed some issues with metrics
V 2.7
- fixed another bug introduced by bukkit
V 2.6
- fixed an issue which caused server crashes do to an bukkit issue
V 2.5
- added Metrics For More Info and Opt-Out
V 2.4
- ready for 1.1. R5
V 2.3
- added categoryOder config node which determines the order the message categories are processed.
You don't need to have the default category in, this will always be done last by default!
If you let your config autoupdate please remove the default category if you don't want it!
V 2.2
- added message displayed to player when he changes worlds
V 2.0
- added permission support for messages
- add log and config classes
- updateable config
- update check
v 1.2
Added %world variable
v 1.1
DisplayName is being used as Playername
v 1.0
Ininital Release
Source
下载 MessageChangerLite
下载 MessageChangerLite
下载 MessageChangerLite
下载 MessageChangerLite
下载 MessageChangerLite
下载 MessageChangerLite
下载 MessageChangerLite
下载 MessageChangerLite
下载 MessageChangerLite
下载 MessageChangerLite
V2.10
- 修复了当部分默认消息缺失时出现的空指针异常(NPE)
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
ExyliaPlugins 的库。
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
插件
创建用户友好的菜单以前往不同的世界
插件
专为 Velocity 打造的自制聊天插件,功能丰富——支持跨服群组/全局/私聊消息,并集成 LibertyBans 的禁言功能。
插件
一个高度兼容、功能完善且稳定的 TPA 模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧