CobraKits
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!
Hello, im using this plugin and recently i had to use an different host and one thing that was not working are the attributes on items, what was first this:
(- ==: org.bukkit.inventory.ItemStack
type: SKULL_ITEM
damage: 3
meta:
==: ItemMeta
meta-type: SKULL
display-name: Suldier
internal: H4sIAAAAAAAAAH2Uy47jVBCGPdPTTbqhkUCwgg0SEoOsJr4nkRihJLZjO44dO44dWyMhX45v8S22kzh+Cd4DIZ5gVqx4C7a8AGvwjDStjnqaZZ36q/6vzu0Ggm6gT1bbfZIsy9yPEtCDn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SzWyl220XL4BIdNJJhhVLbzZeuuziMrE67MJRmMeNReWa20qybVwtwU3MJPkNHvvLqFQT1oBeSnQLoY43Ffl7liReBErqGPh93Lz5y9jVY5F7kd4vvPpTLC6i3XvP0Iq9qqMfYF9D121AEdhd/+tftBXQ1TvN9VnfaH3vQ7X2Xdx6fBSADZeT+kNoNB+ykDrt6ufu67DrKs67knuaxEnrofAt+P3P+6PD3Q+dnj5y/et9vm+Xu1rHdrQqqqKrtzAVPMfxfzRnNlUCf0Vx99/XVe5qf3rz8549fXn//iOjL+wnzA0hBVq8KALynWD6sPqO4/PXNGcULgX24J5ePCL5439Ou62442k7t4MnN+KD4/Ez+/PfM/3b0zUP/l4/8b+9blmlePmV8roKg/wDyTFK8LAcAAA==
to
- ==: org.bukkit.inventory.ItemStack
type: SKULL_ITEM
damage: 3
amount: 64
meta:
==: ItemMeta
meta-type: SKULL
display-name: Ken Kanukey
skull-owner: KenKaneki
i dont know what makes it change to this but it happens everytime i restart the server.
i need the attributes and i have a whole file i just need to place the kits
please help
Alright so I got this plugin and its great love it but none op people can't use kits...
I got Luckperms and did set all the perms using PermissionEX and I also tried LuckPerms yet still non-op people cant use the kits... Pls help!!!!
Where Do I use/put the permissions?
I need to make it so that players can actually click and use the signs (they cant at the moment) but I dont know where or how I use the permissions
In reply to Forge_User_84589386:
So I understand that -c makes it so it doesn't replace the players inventory, but when/where do I do -c? /ckit <kitname> -cd 60 -c or do my players have to do /kit starter -c? If so, is it possible to make it default to not replace the inv?
Whenever a player his inventory is full and he does /kit (name) the kit replaces the items with the kit is there a solution?
In reply to Forge_User_87984019:
I recently discovered non oped players cant use /lkit or /kits to view the list of kits. I did try adding cobrakits.use but that didnt work. Can you please add a valid or a different permission node for this. Thanks
Regards, xVRage
I lose my items can you fix it
when i put the perm cobrakits.use in it doesnt work any help i have it in default and all the others work
wont work for me it keeps on coming up with
Could not load 'plugins\CobraKits.jar' in folder 'plugins'
Please come back and grace us with an update <3
How do I make it so that I can let everyone use these kits instead of ops?
@Academician
./ckit <name>
@Academician The node cobrakits.use seems to give EVERY user the ability to see ALL defined Global kits!
Not just that ones, that he can use. (cobrakits.KIT1, cobrakits.KIT2, etc.) but also that ones, where he don't got any permissions for. In addition to that, he can use them all. Using CobraKits 1.1 PEX 1.22.3 and Cauldron 1.7.10
Just wondering.I can't seem to see the command to add a kit.Plz Respond the command Thanks!
In reply to BananaGuy18:
@Cronos2212
Do you have a global cooldown set? Global cooldowns will override any individual kit cooldown as per the documentation above.
The cooldowns are broken... I've added cooldowns to every kit, and it even say's different cooldowns in the kits.yml file, still in-game when players click signs the cooldown is only 10 minutes...
Great plugin otherwise :)
how do i add specific permission to specific kit?