Kits [v1.7.4]

Kits


Downloads

You can download the latest build here.

GitHub Repository

You can view the Kits GitHub Repository here.

How to Install

Simply drop the downloaded JAR into your mods folder! If you don’t know how to make a Sponge server, check out the Sponge Documentation!

Commands

/kits [pgNo] - Shows a PaginatedList of all the avaliable kits, and enables you to spawn 
them in by click on text.
/kit [name] - Spawns in a Kit with the specified name.
/kit [name] [player] - Spawns in a Kit for specified player.
/kit reload - Reloads Kits Config
/kit add (kit name) (item name) (number of items) (subtype) - Adds an Item to a Kit or 
can Add a Kit with a Specified Item. Subtype is optional!
/kit interval [kit name] [interval | one-time (true)] - Sets the interval of a kit to a
specified number in *seconds* if you do /kit interval [kit name] true it'll be set to one-time.
/kit delete [kit name] - Deletes the specified kit from the config. Please note that 
when doing this, for the Kits list to update you must reboot your server!
/kit reset <kit> - Resets the remaining time to use the kit again for every player.

Permissions

kits.use - Access to the /kit command.
kit.use.others - Access to give Kits to others.
kits.reload - Access to the /kit reload command.
kits.list - Access to the /kits command.
kits.add - Access to the /kit add command
kits.interval - Access to the /kit interval command
kits.delete - Access to the /kit delete command.
kits.reset - Access to the /kit reset command.
kits.sign.create - Access to create Kit signs.
kits.sign.use - Access to use Kit signs. 

Kit Specific Permissions

kits.use.[kitname] - Access to the /kit [kitname] command.

For example, if you wanted to give permission to use kit default, the permission would be

kits.use.default

Note that if you choose to have multiple kits, and are using permissions and would like it so specific groups can only use some kits, you have to set the permissions for the other kits to false!

Ex. If you have kit default and kit test, and would like the following group default to only have access to /kit default.

kits.use=1
kits.use.default=1
kits.use.test=-1

Configuration


Adding Items to a Kit

If you’d like to add an item to the kit, simply use /kit add [kit name] [item name], and the item appears in the kit the next time you use the command. No need to even restart your server.

For example, if you’d like to add an apple to kit default, you’d simply do

/kit add default minecraft:apple 1

It’s as simple as that! :smiley:

If you’d like to add say 5 apples, you’d simply do:

/kit add default minecraft:apple 5

If you’d like to add say 5 granite (a subtype of stone), you’d simply do:

/kit add default stone 5 1

Adding Kits

Simply use /kit add [kit name] [item name].

For example, if you’d like to add kit owner with a diamond sword, you can just do

/kit add owner minecraft:diamond_sword

Then, all you have to do is reboot your server, and poof! Your kit is ready to go!

How do you Spawn a Kit?

Simply use the following command:

/kit <name>

Kit Signs

Permissions for creating and using Kit signs are listed in the permissions section above.

The format for a Kit sign is the following:

[Kit]
kit name

Support Me

If you’re feeling generous and would like to send me a tip, you can do so using PayPal here. Any and all donations are greatly appreciated! :smiley:

11 Likes

Nice job. Make sure, though, when the InventoryAPI is implemented, to update your plugin accordingly.

1 Like

Of course :smiley: ! Thanks for helping me earlier today!

No problem. :wink:

1 Like

I’d suggest adding/deleting Kits via commands if possible. That’s a lot easier.
You could list the available kits via paginated lists too.
( Paginated Lists - A library for plugin developers! )

permissions would be:
kits.add
kits.delete

1 Like

Great idea! Thanks! :smiley:

Why don’t you use a list of strings in your items section?

so:

items=["thing", "thing"]

not OP, but presumably for extra tags like damage value (for now), NBT…

Correct me if I’m wrong but you can’t convert from String to a ArrayList. I’d have to use the same method of parsing the input.

Thanks for that reference! I added it to the plugin! :smiley:

1 Like

I think there is something like a getList() method of ConfigurationNode. I’ve never worked with this before.

“getList(Function converter) method is a bit more interesting. It takes a function that is executed for each element in the list to get its final value.”

That’s all I found on the Configurate wiki.

Found in 30 seconds: https://github.com/zml2008/configurate/blob/master/configurate-core/src/main/java/ninja/leaping/configurate/ConfigurationNode.java
I hope I have found the right thing.

Not sure what

@param transformer The transformation function 

really means. But I’ll look into it.

I think you use like so;
https://github.com/zml2008/configurate/blob/master/configurate-core/src/test/java/ninja/leaping/configurate/transformation/ConfigurationTransformationTest.java#L56

you’re not doing any form of command line parsing. when the commands are given with no parameters, your plugin throws an exception.

if I issue the command “/kit” the client comes back with “Error occurred while executing command: null” and the server log comes up with errors.

see http://pastebin.com/P9iBC4xT

ditto if you use “/kits” without a number. The client comes back with “Error occurred while executing command: For Input string “”” and the server comes up with error as seen here: http://pastebin.com/kXXwp8aN

If someone enters “/kit” with no parameters, they should receive a response such as “Usage: /kit <kitname>” and “/kits” with no parameters should start at page one automatically.

If these issues were cleaned up it would make the plugin more usable and user friendly.

keep up the great work.

cheers, wizdude.

the ability to specify the quantity of an item would be very cool as well.

i’d like to have a mining kit that comes with 10 torches as an example.

cheers, wizdude.

1 Like

Will work on that! Thanks for the advice!

EDIT: This issue has been resolved! :slight_smile:

Definitely going to be working on that!

EDIT: Implemented! (Not tested yet)
EDIT 2: Implemented and Tested!

do you have a build of this available for download? i can see you updated the documentation for your latest code but your development download link in the first post is only the initial release.

thanks :wink: