Got a question that the wiki doesn't answer? Ask on the forum (preferred), or join us on IRC.

BeastNode

CommandBook/Kits

From EngineHub.org Wiki
Jump to: navigation, search

Kits are packages of items that you can allow people to pickup. You can, for example, create a starter kit that allows people to start off with some basic tools. Kits are managed inside the kits.txt file that should be auto-generated inside your plugins/CommandBook folder.

Creating kits

The general format for a kit is:

[starter]
woodpick
woodaxe
woodshovel
wood,64

The name of the kit is "starter" and below is the list items that is given to the player. The player should receive items in that order. The last line gives 64 quantity of wood blocks, as indicated by the comma and following number. You can also give items with "data values" like colored wool with something such as wool:4 (just like the /item command).

Example: A colored textiles kit
[textiles]
wool:0,64
wool:1,64
wool:2,64
wool:3,64
wool:4,64
wool:5,64
wool:6,64
wool:7,64
wool:8,64
wool:9,64
wool:10,64
wool:11,64
wool:12,64
wool:13,64
wool:14,64
wool:15,64
Tip: You can give an "infinite" stack of items by giving the quantity -1.

Delays

You can prevent a person from getting the same kit repeatedly quickly by giving the kit a delay timer before that same person can get the kit again. To do so, just put it like so:

[starter=20]
woodpick
woodaxe
woodshovel
wood,64

That creates a delay of 20 seconds that players have to wait before they can pickup that kit again.

Warning: Delays do not persist between server restarts, meaning players can get the kit again if your server is restarted or CommandBook is reloaded.

Permissions

The main kit permission is commandbook.kit, allowing players to list and get kits. As of CommandBook 1.6, you can restrict giving kits to other players by denying commandbook.kit.other. If you want to control what kits people can get, and also to control the kit list command, use the following permissions:

  • commandbook.kit.list
  • commandbook.kit.kits.# (Where # is the name of the kit.)
Example: Giving the permission for only the starter kit
commandbook.kit.kits.starter

Navigation menu