AmazingKit 是一个允许玩家获取多种预设装备包的插件。
这个想法并不新颖,我自己也曾在 CommandBook 中使用 /kit 命令很久,但它存在一些严重的缺点,迫使我编写了这个插件。
功能:
- 在游戏中直接创建和编辑装备包——在设置过程中你甚至不需要触碰配置文件!
- 服务器重启后保存用户的装备包冷却时间:你是否遇到过玩家在服务器重启后立即获得所有装备包的情况?在本插件中不会发生这种情况,用户冷却时间存储在单独的文件中。
- 你可以按照自己的意愿命名装备包——支持任何语言。例如,/kit food、/kit еда 或 /kit λύφο。
- 你可以在装备包中存储任何类型的物品及其任意元数据——即使是附魔工具或已书写的书籍!
- 玩家首次加入服务器时,可以自动获得其中一个装备包。
配置
- messages.<language>.<key> - 插件所用任何短语的翻译。你可以根据需要进行编辑。
- locale - 插件所使用的语言翻译(目前为 "ru" 或 "en")。
- kitOnFirstJoin - 玩家首次加入服务器后将获得的装备包(如果有权限)。可以是 <kitname>,如果不需要则为 "none"。
- kits.* - 关于已存储装备包的信息。
权限
- amazingkit.kit - 访问 /kit 命令。
- amazingkit.kit.<kitname> - 访问名为 <kitname> 的装备包。
- amazingkit.manage - 完全访问创建和编辑装备包的权限。注意,你必须额外拥有 amazingkit.kit 权限。
命令参考
- /kit (或 /kit list) - 获取可用装备包列表
- /kit <name> - 获取名为 <name> 的装备包
- /kit reload - 重新加载配置文件
- /kit clearcooldown - 重置所有用户冷却时间
- /kit create <name> - 创建一个名为 <name> 的空装备包
- /kit erase <name> - 完全移除名为 <name> 的装备包
- /kit clear <name> - 移除装备包 <name> 中的所有物品
- /kit view <name> - 查看关于装备包 <name> 的信息
- /kit add/push/put <name> (手持物品) - 将你手中的物品添加到装备包 <name> 的末尾
- /kit set <name> <position> (手持物品) - 将你手中的物品放入装备包 <name> 的位置 <position>
- /kit get <name> <position> - 从装备包 <name> 的位置 <position> 获取物品
- /kit delete/remove/del/rem <name> <position> - 移除装备包 <name> 位置 <position> 上的物品。<position> 之后的所有物品将向左移动 1 位。
- /kit cooldown <name> <cooldown> - 编辑装备包 <name> 的冷却时间。冷却时间以秒为单位计算。
安装
- 下载插件
- 将其放入 /plugins 目录
- 重启服务器
- 享受吧!
使用示例
以下是创建、编辑和获取装备包的示例:

这是按顺序执行以下命令的结果:
- /kit create starter
- /kit push starter (手持钻石)
- /kit push starter (手持书)
- /kit cooldown starter 86400
- /kit view starter
- /kit starter
- /kit starter
因此,config.yml 看起来像这样:

指标收集
此插件使用了 Hidendra 的插件指标系统,这意味着以下信息会被收集并发送到 mcstats.org:
- 唯一标识符
- 服务器的 Java 版本
- 服务器是离线模式还是在线模式
- 插件的版本
- 服务器的版本
- 操作系统版本/名称和架构
- CPU 的核心数量
- 在线玩家数量
- Metrics 版本
可以通过编辑 plugins/Plugin Metrics/config.yml 并将 opt-out 更改为 true 来退出此服务。
源代码
抱歉我的英语不好,我的母语是俄语。
AmazingKit is a plugin that allows players to receive a variety of play kits.
This idea is not new, and by myself i enjoyed /kit's in CommandBook for a long time, but it had serious disadvantages, that forced me to write this plugin.
Features:
- Create and edit kits directly in the game - you can not even touch the config file during setup!
- Save user recharges (cooldowns) of kits after server reboot: a familiar situation when players immediately after a server restart receive all kits? In this plugin so do not work, user recharges stored in a separate file.
- The ability to name a kit so as you want - in any language. For example, /kit food, /kit еда or /kit λύφο.
- You can store in kits any type of item with any metadata - even enchanted tools or written books!
- The ability to get one of the kits automatically when the player joins to the server first time.
Configuration
- messages.<language>.<key> - translation of any phrase being used by the plugin. You can edit it as you wish.
- locale - language translation being used by the plugin ("ru" or "en" at the present time).
- kitOnFirstJoin - any player after first join on the server will receive this kit (if have permission). May be <kitname> or "none" if not.
- kits.* - information about stored kits.
Permissions
- amazingkit.kit - access to command /kit.
- amazingkit.kit.<kitname> - access to a kit with name <kitname>.
- amazingkit.manage - full access to kit creating and editing. Note that you must have amazingkit.kit permission additionally.
Command reference
- /kit (or /kit list) - get list of available kits
- /kit <name> - get kit with name <name>
- /kit reload - reload configuration file
- /kit clearcooldown - reset all user cooldowns
- /kit create <name> - create empty kit with name <name>
- /kit erase <name> - fully remove kit with name <name>
- /kit clear <name> - remove all items in kit <name>
- /kit view <name> - view information about kit <name>
- /kit add/push/put <name> (with item in hand) - add item in your hand at the end of kit <name>
- /kit set <name> <position> (with item in hand) - put item in your had to the kit <name> on position <position>
- /kit get <name> <position> - get item from kit <name> on position <position>
- /kit delete/remove/del/rem <name> <position> - remove item in kit <name> on position <position>. All items in kit after <position> will be shifted to the left by 1.
- /kit cooldown <name> <cooldown> - edit cooldown of the kit <name>. Cooldown measured in seconds.
Installing
- Download a plugin
- Put it in /plugins directory
- Restart server
- Enjoy!
Usage example
This is an example of creating, editing, and getting of a kit:

That was consistent execution of these commands:
- /kit create starter
- /kit push starter (with diamond in hand)
- /kit push starter (with book in hand)
- /kit cooldown starter 86400
- /kit view starter
- /kit starter
- /kit starter
So, after that config.yml looks like this:

Metrics Collection
This plugin utilises Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
- A unique identifier
- The server's version of Java
- Whether the server is in offline or online mode
- The plugin's version
- The server's version
- The OS version/name and architecture
- The core count for the CPU
- The number of players online
- The Metrics version
Opting out of this service can be done by editing plugins/Plugin Metrics/config.yml and changing opt-out to true.
Source code
Sorry for my bad english, my native language is russian.
评论 0
登录后参与评分
还没有评论,来抢沙发吧