[Discontinued/Not available anymore] BetterKits - NBT support, Kit preview, easy to use

BetterKits is an easy to use kit plugin compatible with Bukkit 1.7.10+ and SpongeAPI 5 (MC 1.9.4+) servers.

####Major features

  • Supports item NBT data (for modded items like bags!)
  • Supports Cauldron servers
  • Kit preview (currently Bukkit only because of missing implementation on the Sponge Inventory API)
  • Per kit cooldown (and per kit cooldown bypass permission )
  • Per kit permission (users with this permission can get the kit without limits)
  • Command to give a limited amount of kits to players
  • Assign commands to be run when a player gets a specified kit

####Commands and permissions

  • /kit (kitname) - get a kit (permission: betterkits.kit.(kitname), or simply betterkits.kit for all kits)
  • /kits - kit list (permission: betterkits.list for available kits only, betterkits.listall to show all kits even if the player hasn’t the permission ti get it)
  • /kitcreate (kitname) - create a new kit for the target chest (just look at it directly) (permission: betterkits.create)
  • /kitpreview (kitname) - shows a preview of the kit (permission: betterkits.preview)
  • /kitgive (player) (kitname) (amount) - gives the specified amount of the specified kit to the specified player (permission: betterkits.give)
  • /kitdelete (kitname) - deletes the specified kit (permission: betterkits.delete)
  • /kitedit (kitname) - edits the specified kit content (permission: betterkits.edit)
  • /kitclearcache - necessary after editing a kit content (permission: betterkits.clearcache)
  • /kitreload - reloads the config (permission: betterkits.reload)


####Basic installation and configuration

  • Copy the jar file under “/plugins/” (Bukkit) or “/mods/plugins/” (Sponge).
  • Restart the server.
  • Make a protected area in your server that will contain all the kit chests (e.g. a private dimension or another protected area). This area must be inaccessible to players.
  • Place a chest and fill it with the content of the kit you wish to create.
  • While looking at the chest within 4 blocks without any other block between you and the chest, use “/kitcreate (KitName)”.
  • You can make more kits by placing a new chest and repeating the previous instructions.
  • WARNING: do not remove the chests you made for the kits! Those are used to read the kits items content! You also have to be sure the chests are inaccesible to players, or players may steal from them!

#####Further details
Kits are stored into chests in the world so NBT data is preserved and kits can be modified easily.

Kits can be created by placing a chest, filling the chest with items, then running the /kitcreate (kitname) command while looking at the chest. Do not remove the chests. Be sure to protect the chests from players.

Players can get kits with the “/kit (kitname)” command. Kits can be added to players with the “/kitgive (playername) (kitname) (amount)” (the player still have to use the /kit command), or allow them to get the kit without the amount limits with the permission node “betterkits.kit.(kitname)”.

Cooldown can be assigned to kits so the player won’t spam the kit command with the command “/kitedit (kitname) cooldown (seconds)”. Cooldown can be bypassed with the permission node “betterkits.cooldownbypass.kit.(kitname)”.

Players can preview the kits with the “/kitp (kitname)” command. The “betterkits.preview” permission node is necessary (default to true).

Kit chest content is cached after first kit use. After modifying the kit chest content by either using the “/kitedit (kitname) content” or by manually opening the chest, use /kitclearcache.

Commands can be also run when a player gets a kit. Check “/kitedit (kitname) <commandslist|addcommand|removecommand>”. Commands are run by console. When adding a command, you can specify %name and %uuid and they’ll be replaced with the player’s name and uuid.

Kits can be deleted with the “/kitdelete (kitname)” command.

The config.yml/config.conf file contains a list of allowed chests. More chests can be added on the list by specifying the proper Material (Bukkit) or BlockType (Sponge) name.

The plugin can be reloaded with /kitreload.


Some things:

  • Use the native ReloadGameEvent (/sponge plugins reload)
  • The installation instructions should be: put into mods folder, not plugins folder
  • You inject the ConfigurationLoader but don’t seem to use it, instead you resolve manually the config path. Rather use only the provided loader
  • config node names should be hyphen-separated
  • don’t register TypeSerializers globally. Instead make a copy of the default config options and then register there the serializers. Do that so that other plugins don’t override public accessible types and their serializers, or the other way around.
  • there already is a choice conmand element built into sponge
  • instead of returning an empty command result when a command fails(e.g. not executed by player) throw a CommandException. You can use the text you sent to the player first for the exception.

Installing now! I will test your plugin!

Does this support starter kits? So a player spawns in with certain items?

@Siigari I forgot about it! I’ll add that asap!

@RandomByte Thank you for your suggestions.

  • I will add support for the GameReloadEvent, but I’ll keep the kitreload command anyway.
  • I need the config path for saving/loading data, and I’m using the ConfigurationLoader on Config.java
  • I prefer to maintain the same permission nodes used on the Bukkit version.
  • I followed the documentation, and there isn’t any issue about registering TypeSerializers globally. I really doubt someone will need a different TypeSerializer for this plugin classes. And anyway they can register their TypeSerializers locally if they want to do so.
  • I don’t like the default one.

@Siigari Added the starter kits as you suggested. Thanks.

This is exactly what I need however is there a 1.8.9 version for spongeforge ?

Hello! I’ll try to make it SpongeAPI 4 compatible… probably next version.

cool awsome :+1:

edit: how long till next release ??

I’ve done a lot of work to make it for the SpongeAPI 4.1 since yesterday. Now I completed all the necessary code, and then I tested it on the 1.8.9 server. I found that Sponge developers didn’t implement their inventory API on their latest version of Sponge for 1.8.9 servers.

java.lang.AbstractMethodError: Method net/minecraft/tileentity/TileEntityChest.getInventory()Lorg/spongepowered/api/item/inventory/type/TileEntityInventory; is abstract
at net.minecraft.tileentity.TileEntityChest.getInventory(TileEntityChest.java) ~[aky.class:?]

It’s even on the SpongeDocs: https://docs.spongepowered.org/4.1.0/en/plugin/blocks/tileentities.html

I doubt they will do something about that.

Honestly, I am disappointed about the lack of such a basic thing. I suggest either upgrading to Sponge 1.10.2 or, if you want to run a Vanilla server, use Bukkit 1.8.9 (BetterKits works with Bukkit 1.8.9 servers).

as it is a pixelmon server that will be a little hard sadly tho depending on when pixelmon bring out the stable 1.10.2 depends on when I can upgrade

At the moment, Pixelmon is stable on 1.10.2 - arguably even more stable than 1.8.9 versions. If you have questions, you can join us in Pixelmon’s Discord. It uses the same memory range, so if you need help updating, let us know.

1 Like

im currently on pixelmon 1.8.9 beta 9 probably start looking to upgrade over the weekend if all go’s well ill be able to open the server


Does 0.92 work? I am on Sponge 1770 Api 5 and when I attempt to make a kit it says:

Is there a version that is stable?

All the commands do that except /kit

Hello. Please see this: https://github.com/KaiKikuchi/BetterKits/issues/2

Will be fixed soon. You can provide more info to the Github issue post, like what is your server OS, and your Java, Forge and Sponge server version. Thank you!

Thank you for your report. The issue was caused by resources extraction from the JAR on Linux. It has been fixed on BetterKits version 0.9.3.

It is better to use the Asset API rather than getResource() for reasons like this one.

Hello. The default config and messages files are shared between the Sponge and Bukkit versions on the same jar file, so the Asset API is not the best option in this case. Anyway, the issue wasn’t the getResource (which seems to work fine). I was using a “jar:file” URL to read the jar file content. It looks like it doesn’t work in all servers because of missing implementations.

By the way, v.0.9.4 is out.

Version 0.9.5 is out

  • Added a warning about items being dropped on the ground when using /kit.
  • Fixed “No value present” bug caused by chunks not being loaded when caching the kit items from the world.

Just what everyone needs, finally one that supports NBT! :grinning:

1 Like