CobraKits
版本 1.1 已发布!
CobraKits 是一款功能全面的 Bukkit 套件插件,允许管理员和玩家在游戏中创建套件,无需编辑任何配置文件,且完全通过游戏内命令进行管理。你只需要在自己的物品栏中设置好套件,CobraKits 就会自动处理其余部分!CobraKits 支持附魔、撰写书籍、命名物品、药水效果以及每个套件的冷却时间。它还支持 SuperPerms 权限系统,以控制谁可以使用和管理套件以及更改插件设置。
安装
- 将 CobraKits.jar 放入你的 plugins 文件夹并重启服务器。
- 插件会生成一个包含 kits.yml、cooldowns.yml 和 config.yml 文件的 CobraKits 文件夹。
- kits.yml 可以编辑,但请小心!任何错误的记录都会导致插件错误。
命令
- /ckits - 此命令将显示使用说明并提供更改配置选项的入口。
- /ckits help [command] - 显示所有命令的帮助信息,或详细解释某个命令。
- /ckits current - 显示配置选项及其当前值列表。
- /ckits cooldown - 切换套件冷却要求的开启/关闭状态。
- /ckits duration [seconds] - 获取当前持续时间或将其设置为指定的秒数长度。
- /ckits silent - 默认切换静默标志的开启/关闭状态。
- /ckits concat - 默认切换合并标志的开启/关闭状态。
- /ckits startkit +/-[kitname] - 添加/移除 首次登录套件
- /ckits loginkit +/-[kitname] - 添加/移除 登录套件
- /ckits respawnkit +/-[kitname] - 添加/移除 重生套件
- /ckits updater - 切换自动更新检查器的开启/关闭状态。
- /ckits update - 尝试将 CobraKits 更新到最新版本。
- /kit [kitname] - 用指定的套件替换玩家当前的物品栏。
- -s or -silent - 应用套件时不显示消息。
- -c or -concat - 将套件添加到玩家的物品栏中,而不是替换它。
- -g or -global - 如果个人套件与全局套件同名,则使用全局套件。
- /kit [kitname] [username] - 将请求的套件给予指定玩家。
- 兼容静默和合并标志。(不需要全局标志,因为必须始终输入完整的套件名称)。
- 使用/给予玩家套件时,会移除玩家身上的任何药水/减益效果。
- /lkit or /kits - 列出玩家有权限使用的套件。
- /lkit # - 跳转到指定的套件列表页。适用于任一列表命令。
- 套件列表颜色代码指南:
- /ckit [kitname] - 将玩家当前的物品栏转换为套件。支持以下标志:
- -cd/-cooldown [seconds] - 为此套件添加冷却时间。
- -kc/-cost [itemID:amount] - 指定套件成本,需注明 itemID 和所需数量。
- -p/-potions - 捕获玩家身上的活跃药水效果。
- -g/-global - 创建全局套件。(需要 cobrakits.createall)
- -sk/-server - 创建服务器套件。(需要 cobrakits.*)
- /ukit [kitname] - 根据玩家当前的物品栏更新指定的套件。标志:
- -cd/-cooldown [seconds] - 更新套件的冷却时间,设置为 0 以清除。
- -kc/-cost [itemID:amount] - 更改套件成本,指定 "clear" 以重置。
- -p/-potions - 更新药水效果,如果没有活跃效果,这将清除它们。
- /rkit [kitname] [newname] - 将套件重命名为给定的新名称。支持以下标志:
- -g/-global - 将套件所有者更改为全局,忽略 [newname]。(需要 cobrakits.renameeall)
- -sk/-server - 将套件所有者更改为服务器,忽略 [newname]。(需要 cobrakits.renameall)
- 要重命名你自己的个人套件,只需指定套件名称即可。其他所有重命名都需要 owner.kitname 格式。
- /dkit [kitname] - 从插件中移除指定的套件,此操作不可撤销。
权限
所有权限默认均为 OP(操作员)。所有包含 "all" 的权限继承其较低变体。
- cobrakits.* - 允许完全访问所有命令。
- cobrakits.[kitname] - 玩家可以给自己这个特定的套件。
- cobrakits.use - 授予列出和使用自制的个人套件以及全局套件的权利。
- cobrakits.useall - 玩家可以列出和使用任何个人套件或全局套件。
- cobrakits.give - 允许向其他玩家给予任意套件的能力。
- cobrakits.create - 授予创建个人套件的权利。
- cobrakits.createall - 玩家可以直接创建全局套装。
- cobrakits.update - 允许玩家更新他们的个人套装。
- cobrakits.updateall - 授予访问权限以更新任何个人套装或全局套装。
- cobrakits.rename - 玩家可以重命名他们自己的个人套装。
- cobrakits.renameall - 授予重命名任何个人套装或全局套装的能力。
- cobrakits.delete - 玩家可以删除他们的个人套装。
- cobrakits.deleteall - 允许玩家删除任何个人套装或全局套装。
- cobrakits.cooldown.bypass - 授予玩家绕过冷却时间设置的能力。
- cobrakits.cooldown.bypass.[kitname] - 玩家可绕过此套装的冷却时间。
- cobrakits.cost.bypass - 授予玩家无需支付费用的能力。
- cobrakits.cost.bypass.[kitname] - 允许玩家免除此套装的费用。
- cobrakits.sign.create - 玩家可以创建套装告示牌。
- cobrakits.sign.use - 允许玩家使用套装告示牌。
- cobrakits.sign.use.[kitname on sign] - 允许使用带有指定套装名称的告示牌。
- cobrakits.login - 允许玩家获取登录套装。
- cobrakits.login.[kitname] - 玩家可以获取特定的登录套装。
- cobrakits.respawn - 允许玩家获取重生套装。
- cobrakits.respawn.[kitname] - 玩家可以获取特定的重生套装。
套装类型
CobraKits 有 3 种套装类型:
- 服务器套装 (Server Kits) - 旨在用于告示牌,或作为任意登录/出生点套装设置的一部分。
- 在没有 cobrakits.* 权限的情况下无法直接使用。
- 当用于告示牌或登录/出生点套装设置时,名称中不需要包含 "Server."。
- 全局套装 (Global Kits) - 旨在供大多数玩家访问使用的套装。
- 需要拥有 cobrakits.use/useall 权限才能查看和使用它们。
- 如果玩家仅拥有 cobrakits.[kitname] 权限,则无法看到这些套装。
- 使用时名称中不需要包含 "Global."。
- 个人套装 (Personal Kits) - 由玩家拥有/创建的套装。
药水效果
- 在运行 /ckit 或 /ukit 命令时指定 -p/-potions 标志,会将玩家当前激活的药水效果捕获到套装中。
- 药水效果的持续时间是后端计算的,因此在使用套装时将按完整持续时间给予效果。
- 如果自定义药水效果时长超过 8 分钟,则该时长将被保留。
- 在 创建/更新套装时 超过 1638 秒的效果将在游戏中注册为“无限”。
- 无法单独指定药水效果,捕获时玩家必须处于药水效果激活状态。
- 可以使用服务器内置的 /effect 命令添加自定义效果。
- 若要清除药水效果,应用该套件后,执行清除所有药水效果的命令(/effect [用户名] clear),然后更新套件并指定 -p/-potion
- 药水效果也受 /kit 的 -c/concat 标志影响。
套件消耗
- CobraKits 支持用于套件消耗的简易物品交易系统,可通过 /ckit 或 /ukit 进行设置。
- -kc/-cost [材料:数量] 是当前语法。物品耐久度设置为最大值,因此玩家无法使用受损物品兑换套件。
- /ckit 和 /ukit 的帮助部分中包含了材料名称列表的链接。
- 若要清除套件消耗,在对自己应用该套件后更新套件,并指定 -kc/-cost clear
套件冷却时间
- CobraKits 中的每个套件都可以拥有独立的冷却持续时间。
- 全局冷却设置将覆盖单个套件的冷却时间。
- 冷却时间在服务器重启及登出/重新登录后依然保留。
- 当前语法为 -cd/-cooldown [秒数]
- 若要清除冷却时间,在对自己应用该套件后更新套件,并指定 -cd/-cooldown 0
出生点套件
CobraKits 可以在玩家登录或重生时给予其套件。操作方法如下:
- 首次登录套件 — 在玩家首次加入服务器时应用。
- 登录套件 — 在玩家每次重新加入服务器时应用。(需要权限)
- 重生套件 — 在玩家死亡重生时应用。(需要权限)
具体步骤如下:
- 确保你拥有正确的权限:OP 或 cobrakits.*
- 将你的背包装满你想要给予新玩家的物品/方块。
- 运行 /ckit -server [套件名称]
- 对于首次登录套件,运行 /ckits startkit +[套件名称] 注意:建议完整指定套件名称,尽管服务器级/全局级套件不强制要求这样做。
- 对于登录套件,运行 /ckits loginkit +[套件名称]
- 对于重生套件,运行 /ckits respawnkit +[套件名称]
现在,你创建的套件将以静默方式授予加入或重生在该服务器上的玩家。若要禁用此功能,请运行 /ckits (startkit/loginkit/respawn) clear,这将清空列表。
若要移除列表中的特定套件,请运行 /ckits (startkit/loginkit/respawn) -[套件名称]
套件告示牌
创建套件告示牌是一个简单的过程,只需遵循几条规则即可!你需要准备:
- 正确的权限:OP、cobrakits.* 或 cobrakits.sign.create
任意完整名称可在一行告示牌上显示的全名套件,或服务器级/全局级套件。
WorldGuard 或其他类似插件,用于在创建后保护告示牌。
创建告示牌的格式非常简单,并支持大多数 /kit 命令功能。放置一个告示牌,并在对应行输入以下内容:
- [COBRAKIT] 或 [KIT] — 无需大写,但必须使用方括号。
- 留空此行,它将被替换为套件的消耗(如有)。
- kitname — 必须是符合该行长度的完整套件名称。服务器级或全局级套件效果最佳。不得使用方括号或其他任何格式。
- "c" 和/或 "s" — 在此处可以指定可选的 concat(拼接)或 silent(静默)标志。只要该行包含 "c" 和/或 "s",插件即可识别它们。
输入完成后,生成告示牌。如果一切正确,第一行将变为红色,套件名称变为蓝色,标志将以 c|s 的格式显示:激活的选项为金色,未激活的选项为删除线。拥有 cobrakits.sign.use 权限的用户均可使用该套件告示牌;同时它也适用于配置文件中设置的套件冷却时间,因此你可以防止用户过于频繁地获取套件。
源代码
源代码已包含在 .jar 文件中,只需使用兼容的归档应用程序(如 7-Zip)打开即可查看!
现在也可在 GitHub 上获取。
欢迎在工单部分提交任何建议或问题,或在下方添加评论!
CobraKits
Version 1.1 Released!
CobraKits is a comprehensive kit plugin for Bukkit that allows admins and players alike to create kits in-game without editing any configuration files and is managable entirely by in-game commands. All you need to do is set the kit up in your own inventory and CobraKits will take care of the rest! CobraKits supports enchants, written books, named items, potion effects, and per-kit cooldowns. It also has SuperPerms support to control who can use and manage kits and change plugin settings.
Installation
- Drop the CobraKits.jar into your plugins folder and restart your server.
- The plugin will generate a CobraKits folder with a kits.yml, cooldowns.yml, and config.yml file.
- kits.yml can be edited, but please be careful! Any incorrect records will cause plugin errors.
Commands
- /ckits - This command will display usage information and offers configuration change options.
- /ckits help [command] - Display help information for all commands, or detail a command.
- /ckits current - Displays a list of the config options and their current values.
- /ckits cooldown - Toggles on/off the cooldown requirement for kits.
- /ckits duration [seconds] - Retrieves the current duration or sets it to the specified length, in seconds.
- /ckits silent - Toggles the silent flag to be on or off by default.
- /ckits concat - Toggles the concat flag to be on or off by default.
- /ckits startkit +/-[kitname] - Add/remove First Time Login Kits
- /ckits loginkit +/-[kitname] - Add/remove Login Kits
- /ckits respawnkit +/-[kitname] - Add/remove Respawn Kits
- /ckits updater - Toggles on/off the automatic update checker.
- /ckits update - Attempts to update CobraKits to the latest version.
- /kit [kitname] - Replaces the player's current inventory with the specified kit.
- -s or -silent - Does not show a message when the kit is applied.
- -c or -concat - Add the kit to the player's inventory instead of replacing it.
- -g or -global - If a Personal kit has the same name as a Global kit, use the Global kit.
- /kit [kitname] [username] - Gives the requested kit to the specified player.
- Compatible with the silent and concat flags. (The global flag is not needed as a full kitname must always be entered).
- Using/Giving a kit to a player will remove any potion/debuff effects the player is under.
- /lkit or /kits - Lists kits that the player has permission to use.
- /lkit # - Takes you to the specified kit list page. Works with either list command.
- Kit List Color Code Guide:
- Personal kits
- Server kits
- Global kits
- Other Player's Kits
- /ckit [kitname] - Turns the player's current inventory into a kit. Supports these flags:
- -cd/-cooldown [seconds] - Add a cooldown to this kit.
- -kc/-cost [itemID:amount] - Specify a kit cost, in itemID and amount needed.
- -p/-potions - Capture active potion effects on the player.
- -g/-global - Create a Global kit. (requires cobrakits.createall)
- -sk/-server - Create a Server kit. (requires cobrakits.*)
- /ukit [kitname] - Updates the kit specified to the player's current inventory. Flags:
- -cd/-cooldown [seconds] - Update a kit's cooldown, set to 0 to clear.
- -kc/-cost [itemID:amount] - Change kit cost, specify "clear" to reset it.
- -p/-potions - Update potion effects, if none are active this will clear it.
- /rkit [kitname] [newname] - Renames a kit to the given new name. Supports these Flags:
- -g/-global - Change kit owner to Global, ignores [newname]. (requires cobrakits.renameeall)
- -sk/-server - Change kit owner to Server, ignores [newname]. (requires cobrakits.renameall)
- To rename one of your Personal kits, you need to only specify the kit name. All other renames require owner.kitname format.
- /dkit [kitname] - Removes the specified kit from the plugin, this cannot be undone.
Permissions
All Permissions default to OP. All permissions with "all" inherit their lesser variant.
- cobrakits.* - Allows full access to all commands.
- cobrakits.[kitname] - Player can give themselves this specific kit.
- cobrakits.use - Grants the right to list and use self-made Personal kits, and Global kits.
- cobrakits.useall - Player can list and use any Personal or Global kit.
- cobrakits.give - Allows the ability to give other player's any kit.
- cobrakits.create - Grants the right to create a Personal kit.
- cobrakits.createall - Player can create Global kits directly.
- cobrakits.update - Allows the player to update their Personal kits.
- cobrakits.updateall - Grants access to update any Personal or Global kit.
- cobrakits.rename - Player can rename their own Personal kits.
- cobrakits.renameall - Grants the ability to rename any Personal or Global kit.
- cobrakits.delete - Player can delete their Personal kits.
- cobrakits.deleteall - Allows a player to delete any Personal or Global kit.
- cobrakits.cooldown.bypass - Grants the player the ability to bypass the cooldown setting.
- cobrakits.cooldown.bypass.[kitname] - Player bypasses the kit cooldown for this kit.
- cobrakits.cost.bypass - Grants the player the ability to not pay the cost.
- cobrakits.cost.bypass.[kitname] - Allows the player to not pay for this kit.
- cobrakits.sign.create - Player can create kit signs.
- cobrakits.sign.use - Allows the player to use a kit sign.
- cobrakits.sign.use.[kitname on sign] - Allows use of signs with specified kit name.
- cobrakits.login - Allows the player to receive Login kits.
- cobrakits.login.[kitname] - Player can receive specific Login kit.
- cobrakits.respawn - Allows the player to receive Respawn kits.
- cobrakits.respawn.[kitname] - Player can receive specific Respawn kit.
Kit Types
CobraKits has 3 kit types
- Server Kits - Meant to be used on signs or for any of the login/spawn kit settings.
- Cannot be used directly without cobrakits.* permission.
- Doesn't require "Server." in name when used for signs or login/spawn kit settings.
- Global Kits - Meant to be used for kits that most players can access.
- Requires cobrakits.use/useall to see and use them.
- Cannot be seen if the player only has cobrakits.[kitname] permissions.
- Does not require "Global." in name when used.
- Personal Kits - Kits owned/created by the players.
Potion Effects
- Specifying the -p/-potions flag while running the /ckit or /ukit commands will capture the active potion effects of the player to the kit.
- The potion effect duration is calculated on the back end, so they will be granted at full duration when using the kit later.
- If a custom potion effect length is over 8 minutes it will be preserved.
- Effects over 1638 seconds at time of kit creation/update will register as "infinite" to the game.
- There is no way to individually specify potion effects, the potions must be active on the player when captured.
- Custom effects can be added using the server's builtin /effect command.
- To clear potion effects, apply the kit, clear all potion effects (/effect [username] clear), and then update it and specify -p/-potion
- Potion effects are also affect by the -c/concat flag for /kit.
Kit Costs
- CobraKits supports a basic item trade system for kit costs that can be set with /ckit or /ukit.
- -kc/-cost [Material:amount] is the current syntax. Item durability is set to max, so players cannot trade in damaged items for a kit.
- A link to the list of Material names is included in the help section for /ckit and /ukit.
- To clear a kit cost, update the kit, after applying it to yourself, and specify -kc/-cost clear
Kit Cooldowns
- Each kit in CobraKits can have it's own individual cooldown duration.
- The global cooldown setting will override individual kit cooldowns.
- Cooldowns persist through server restart and login/logout.
- The current syntax is -cd/-cooldown [seconds]
- To clear a cooldown, update the kit, after applying it to yourself, and specify -cd/-cooldown 0
Spawn Kits
CobraKits can give Player's a kit upon login or respawn. Here's how!
- First Time Login Kits - applied to a player when they first join the server.
- Login Kits - applied to a player any time they rejoin the server. (requires permissions)
- Respawn Kits - applied to a player when they respawn on death. (requires permissions)
The directions are as follows:
- Make sure you have the correct permissions: OP or cobrakits.*
- Fill your inventory with the items/blocks you want to give to new players.
- Run /ckit -server [kitname]
- For First Time kits, run /ckits startkit +[kitname] Note: Specifying the full kit name is good practice, though Server/Global kits don't require it.
- For Login kits, run /ckits loginkit +[kitname]
- For Respawn kits, run /ckits respawnkit +[kitname]
Now that kit you created will be granted, silently, to players joining/respawning on the server. To disable the feature, run /ckits (startkit/loginkit/respawn) clear which will clear the list.
To remove a specific kit from the list, run /ckits (startkit/loginkit/respawn) -[kitname]
Kit Signs
Creating a kit sign is a simple process and has only a few rules that you need to follow! You will need:
- The correct permissions: OP, cobrakits.*, or cobrakits.sign.create
- Any kit where the full name fits on one sign line, or either a Server or Global kit.
- WorldGuard or similar plugin to protect the sign after creation.
The format for creating the signs is very simple and supports most of the /kit command functions. Place a sign and type the following on the corresponding lines:
- [COBRAKIT] or [KIT] - Capitalization not needed, but brackets are required.
- Leave this line blank, it will be replaced with the kit's cost, if any.
- kitname - Must be a full kit name that fits this line. Server or Global kits work best. No brackets or any other formatting.
- "c" and/or "s" - Here you can specify the optional concat or silent flags. As long as a "c" and/or "s" is on this line the plugin will find it.
After that is typed, create the sign. If you have everything correct the first line will turn Red, the kitname Blue, and the flags will be displayed in the format of c|s, where active options will be Gold, and inactive options will be strikeout. Any user with the cobrakits.sign.use permission will be able to use the kit sign, and it also works with the kit cooldown set in the config file, so you can prevent user's from getting kits too often.
Source Code
The source code is included in the .jar file, just open it up in a compatible archive application like 7-Zip!
It is also now available on GitHub.
Feel free to submit any suggestions or problems to the tickets section or add a comment below!
评论 0
登录后参与评分
还没有评论,来抢沙发吧