Module: Kit - Module ID: kit

Introduction

Kits are sets of items that can be given out to players when a command is run. Kits can be restricted to certain players using permissions, and can be set to only be redeemable once per set time frame. You can also create a kit that is given to every new player - what we call the “first join kit”.

Using a kit

Simply run /kit [name]. If you have permissions, the money, and are not in a cooldown period for the kit, you will recieve the items in the kit. Nucleus will warn you if some items were lost, and will not redeem the kit if your inventory was full.

You can see all kits you have access to by running /kit list. Kits you have permission for, but are currently in cooldown or are one time kits that have been used, appear struck out.

Creating and Managing Kits

To create a kit you can either:

  • Run /kit create [name]. This will open an inventory window that allows you to add items to the kit like you would add items to a chest.
  • Change your inventory to be the contents of the kit and run /kit add [name], where the name is the name of the kit you want to create. This will create the kit with the contents of your inventory.

To set the cooldown on the kit, run /kit setcooldown [name] [time], where the time interval is the format of the Timespan Argument, for example, /kit setcooldown kit1 6d to set the cooldown for kit1 to 6 days.

To set a kit as “one use only”, run /kit onetime [kit] [true|false].

To set a cost for using the kit, run /kit cost [name] [cost]. Set the cost to 0 to remove the cost. The requires the use of an economy plugin.

To change the contents of a kit, you can either:

  • Run /kit edit [name] and edit your kit using an inventory GUI.
  • Update your inventory to reflect what you want the contents of the kit to be, then run /kit set [name].

To delete a kit, run /kit remove [name]

If a player has used a kit and you wish to remove the cooldown or one-time use so they can use it again immediately, run /kit resetusage [player] [kit].

Adding personalised items to kits

You can put tokens like {{name}} and {{displayname}} on your item’s display names and lore and put them into a kit. When redeemed, the tokens can be replaced - personalising the items (for example, a wooden stick with the item display name {{name}}'s stick can be put into a kit, which will become dualspiral's stick if dualspiral redeemed it).

You must, however, set kit.process-tokens-in-lore to true in main.conf, as this might cause a slight performance hit.

Commands in Kits

Nucleus 0.25.0 introduced adding commands to kits. This does not apply to first join kits.

It’s very important to note that any command will be run by the console, so only give the ability to add commands to kits to highly trusted players. As a result, the kit command add permission, kit.command.add.base is in the NONE group for permissions to try to protect against rogue admins.

Viewing the commands in a kit

/kit command <kit> lists the commands, and if you have permission to remove commands, they can be removed from this list too.

List

Permission: nucleus.kit.command.base

Adding a command

The command to add a command to a kit is /kit command add <kit> <command>, where the command should not start with a /, and anywhere you want to substitute the player’s name, you should add {{player}}.

So, to broadcast a player’s name, you could write: broadcast {{player}} just opened a kit, and this would broadcast dualspiral just opened a kit if dualspiral opened the kit. Similarly, if you wanted to smite someone who opened a kit, then you’d use smite {{player}}, etc.

Permission: nucleus.kit.command.add.base

Removing and clearing commands

To remove commands: /kit command remove <kit> <command|index from list> To remove all commands: /kit command clear

We would normally recommend using the list to remove commands, but you can also type the full command to remove or use the (one-based) index from the /kit command list.

Permission: nucleus.kit.command.remove.base

First Join Kits (Initial Inventory)

Nucleus supports giving players items when they first join your server. Simply create a kit that contains the inventory you want to give the players when they first join, then run /kit setfirstjoin [kitname] true.

This kit is not visible on /kit list, is not redeemable more than once and does not have a cost by default.

Per-Kit Permissions

Nucleus operates on per kit permissions. The permission to use a kit is then nucleus.kits.[name], where name is the kit’s name. This is in addition to the main permission to use a kit, nucleus.kit.base. If you wish to grant permissions for all kits, grant nucleus.kits.

/kit
Module: kit
Redeems a kit.

Aliases: kit

Root command aliases: /nkit

Usage: /kit <kit>

Available subcommands: add, give, set, cost, hidden, edit, setcooldown, list, remove, command, toggleredeemmessage, view, rename, autoredeem, permissionbypass, create, resetusage, onetime, setfirstjoin, info

Default Role: USER

Basic Command Permission: nucleus.kit.base

Permissions

  • nucleus.kit.exempt.cooldown - Default Role: ADMIN
    Allows the user to bypass kit cooldowns.
  • nucleus.kit.showhidden - Default Role: ADMIN
    Shows the user hidden kits in /kits
  • nucleus.kit.exempt.warmup - Default Role: ADMIN
    Allows the user to bypass the warmup for /kit
  • nucleus.kit.exempt.onetime - Default Role: ADMIN
    Allows the user to use one time kits multiple times.
  • nucleus.kit.base - Default Role: USER
    Allows the user to run the command /kit
  • nucleus.kits - Default Role: ADMIN
    Allows the user to use all kits.

This command is similar to the following command(s) found in Essentials: /kit, kits

Essentials Migration Notes: '/kit' redeems, '/kits' lists.

/kit add
Module: kit
Creates a kit with the specified name and current inventory.

This command takes a snapshot of your inventory (excluding your armor) and creates the named kit with it.

The kit can be updated using the /kit edit or /kit set commands, depending on whether you want to use a GUI to edit the kit, or replace the kit with a new copy of your inventory.

See also /kit create if you want to create a kit via a GUI.

Aliases: kit add kit createFromInventory

Usage: /kit add <name>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.add.base

Permissions

  • nucleus.kit.add.base - Default Role: ADMIN
    Allows the user to run the command /kit add
/kit autoredeem
Module: kit
Sets or unsets a kit to auto redeem on login.

A kit set to automatically redeem will be given to a player when they login if they are currently eligible to redeem the kit using "/kit name".

Aliases: kit autoredeem

Usage: /kit autoredeem <kit> <true|false>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.autoredeem.base

Permissions

  • nucleus.kit.autoredeem.base - Default Role: ADMIN
    Allows the user to run the command /kit autoredeem
/kit command
Module: kit
Lists the commands associated with a kit.

Commands are executed as the SERVER. This could allow players that get access to this command to cause serious havoc. Please only give edit and add commands to TRUSTED players.

Aliases: kit command kit commands

Usage: /kit command <kit>

Available subcommands: add, clear, remove

Default Role: ADMIN

Basic Command Permission: nucleus.kit.command.base

Permissions

  • nucleus.kit.command.base - Default Role: ADMIN
    Allows the user to run the command /kit command
/kit command add
Module: kit
Adds a command to the specified kit.

Aliases: kit command add kit command +

Usage: /kit command add <kit> <command…>

Default Role: OWNER

Basic Command Permission: nucleus.kit.command.add.base

Permissions

  • nucleus.kit.command.add.base - Default Role: OWNER
    Allows the user to run the command /command add
/kit command clear
Module: kit
Removes all commands from the specified kit.

Aliases: kit command clear

Usage: /kit command clear <kit>

Default Role: OWNER

Basic Command Permission: nucleus.kit.command.remove.base

Permissions

  • nucleus.kit.command.remove.base - Default Role: OWNER
    Allows the user to run the command /command clear, Allows the user to run the command /command remove
/kit command remove
Module: kit
Removes a command from the specified kit.

There are two ways to specify which command to remove:

* via. index, where the index is the number displayed in "/kit command <kit>"
* via. command, where you can specify the entire command to remove.

If you are playing on the server, it might be easier to use the click interface in "/kit command" or "/kit command edit"

Aliases: kit command remove kit command del kit command -

Usage: /kit command remove <kit> <index>|<command…>

Default Role: OWNER

Basic Command Permission: nucleus.kit.command.remove.base

Permissions

  • nucleus.kit.command.remove.base - Default Role: OWNER
    Allows the user to run the command /command clear, Allows the user to run the command /command remove
/kit cost
Module: kit
Sets the cost for a kit.

Aliases: kit cost kit setcost

Usage: /kit cost <kit> <cost>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.cost.base

Permissions

  • nucleus.kit.cost.base - Default Role: ADMIN
    Allows the user to run the command /kit cost
/kit create
Module: kit
Opens a chest window and lets you create a kit through the Minecraft inventory interface.

This command opens a GUI and allows you to use the standard Minecraft inventory GUI to create the named kit. Any items placed in the kit will be returned to you when you close the GUI, and the kit will be created.

The kit can be updated using the /kit edit or /kit set commands, depending on whether you want to use a GUI to edit the kit, or replace the kit with a new copy of your inventory.

See also /kit add if you want to create a kit by taking a snapshot of your inventory.

Aliases: kit create

Usage: /kit create <name>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.create.base

Permissions

  • nucleus.kit.create.base - Default Role: ADMIN
    Allows the user to run the command /kit create
/kit edit
Module: kit
Opens a GUI for editing kit contents.

This command opens a GUI and allows you to use the standard Minecraft inventory GUI to edit the named kit.

See /kit set if you want to update the kit by taking a snapshot of your inventory. See /firstjoinkit edit if you want edit the initial inventory of new players.

Aliases: kit edit kit ed

Usage: /kit edit <kit>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.edit.base

Permissions

  • nucleus.kit.edit.base - Default Role: ADMIN
    Allows the user to run the command /kit edit
/kit give
Module: kit
Redeems a kit on the specified player.

Allows you to redeem the contents of a kit on another player. By default, this command will normally NOT redeem a kit on a player would not normally be able to redeem the kit. It will also mark the kit as redeemed on the target player - however, it will never charge them.

This behaviour can be overridden using the "-i" flag, which will ignore all cooldowns, and will not mark that the kit has been redeemed.

Aliases: kit give

Usage: /kit give [-i|--ignore] <player> <kit>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.give.base

Permissions

  • nucleus.kit.give.exempt.warmup - Default Role: ADMIN
    Allows the user to bypass the warmup for /kit give
  • nucleus.kit.give.overridecheck - Default Role: ADMIN
    Allows the user to grant kits to those who would not ordinarily be able to obtain a kit using the -i flag.
  • nucleus.kit.give.exempt.cooldown - Default Role: ADMIN
    Allows the user to bypass the cooldown for /kit give
  • nucleus.kit.give.base - Default Role: ADMIN
    Allows the user to run the command /kit give
  • nucleus.kit.give.exempt.cost - Default Role: ADMIN
    Allows the user to bypass the cost for /kit give
/kit hidden
Module: kit
Sets whether a kit is displayed in the kit list.

Aliases: kit hidden

Usage: /kit hidden <kit> <true|false>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.hidden.base

Permissions

  • nucleus.kit.hidden.base - Default Role: ADMIN
    Allows the user to run the command /kit hidden
/kit info
Module: kit
Lists information about the kit.

Aliases: kit info

Usage: /kit info <kit>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.info.base

Permissions

  • nucleus.kit.info.base - Default Role: ADMIN
    Allows the user to run the command /kit info
/kit list
Module: kit
Lists the kits that are available.

Aliases: kit list kit ls

Root command aliases: /kits

Usage: /kit list

Default Role: USER

Basic Command Permission: nucleus.kit.list.base

Permissions

  • nucleus.kit.list.base - Default Role: USER
    Allows the user to run the command /kit list
/kit onetime
Module: kit
Sets or unsets a kit as a one time use kit.

A one time use kit is exactly that, a kit that may be used only once. If you wish to give a kit to a player upon joining for the first time, consider using "/firstjoinkit" instead.

Aliases: kit onetime

Usage: /kit onetime <kit> <true|false>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.onetime.base

Permissions

  • nucleus.kit.onetime.base - Default Role: ADMIN
    Allows the user to run the command /kit onetime
/kit permissionbypass
Module: kit
Sets whether a separate permission is required to redeem a kit, if separate permissions is enabled in the config.

Aliases: kit permissionbypass

Usage: /kit permissionbypass <kit> <true|false>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.permissionbypass.base

Permissions

  • nucleus.kit.permissionbypass.base - Default Role: ADMIN
    Allows the user to run the command /kit permissionbypass
/kit remove
Module: kit
Deletes a kit.

Aliases: kit remove kit del kit delete

Usage: /kit remove <kit>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.remove.base

Permissions

  • nucleus.kit.remove.base - Default Role: ADMIN
    Allows the user to run the command /kit remove
/kit rename
Module: kit
Renames a kit

Aliases: kit rename

Usage: /kit rename <kit> <target name>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.rename.base

Permissions

  • nucleus.kit.rename.base - Default Role: ADMIN
    Allows the user to run the command /kit rename
/kit resetusage
Module: kit
Resets a player's usage of a kit, allowing them to redeem the kit again immediately.

Aliases: kit resetusage kit reset

Usage: /kit resetusage <user> <kit>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.resetusage.base

Permissions

  • nucleus.kit.resetusage.base - Default Role: ADMIN
    Allows the user to run the command /kit resetusage
/kit set
Module: kit
Sets the items in a kit to your current inventory.

This command takes a snapshot of your inventory (excluding your armor) and updates the contents of the named kit with it.

See also /kit edit if you want to edit a kit via a GUI.

Aliases: kit set kit update kit setFromInventory

Usage: /kit set <kit>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.set.base

Permissions

  • nucleus.kit.set.base - Default Role: ADMIN
    Allows the user to run the command /kit set
/kit setcooldown
Module: kit
Sets the cooldown on a kit.

The cooldown must be specified in the form 1w1d1h1m1s, where 1 hour 5 minutes would be "1h5m".

Aliases: kit setcooldown kit setinterval

Usage: /kit setcooldown <kit> <duration>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.setcooldown.base

Permissions

  • nucleus.kit.setcooldown.base - Default Role: ADMIN
    Allows the user to run the command /kit setcooldown
/kit setfirstjoin
Module: kit
Sets up a kit so it gets redeemed for every new player that joins the server.

Aliases: kit setfirstjoin kit firstjoin

Usage: /kit setfirstjoin <kit> [<true|false>]

Default Role: ADMIN

Basic Command Permission: nucleus.kit.setfirstjoin.base

Permissions

  • nucleus.kit.setfirstjoin.base - Default Role: ADMIN
    Allows the user to run the command /kit setfirstjoin
Sets or unsets whether redeeming a kit will notify the target user.

Aliases: kit toggleredeemmessage kit togglemessage

Usage: /kit toggleredeemmessage <kit> <true|false>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.toggleredeemmessage.base

Permissions

  • nucleus.kit.toggleredeemmessage.base - Default Role: ADMIN
    Allows the user to run the command /kit toggleredeemmessage
/kit view
Module: kit
View the contents of a kit.

Aliases: kit view

Usage: /kit view <kit>

Default Role: ADMIN

Basic Command Permission: nucleus.kit.view.base

Permissions

  • nucleus.kit.view.base - Default Role: ADMIN
    Allows the user to run the command /kit view
Permission Suggested Role Description
nucleus.kit.add.base ADMIN Allows the user to run the command /kit add
nucleus.kit.autoredeem.base ADMIN Allows the user to run the command /kit autoredeem
nucleus.kit.base USER Allows the user to run the command /kit
nucleus.kit.command.add.base OWNER Allows the user to run the command /command add
nucleus.kit.command.base ADMIN Allows the user to run the command /kit command
nucleus.kit.command.remove.base OWNER Allows the user to run the command /command clear, Allows the user to run the command /command remove
nucleus.kit.cost.base ADMIN Allows the user to run the command /kit cost
nucleus.kit.create.base ADMIN Allows the user to run the command /kit create
nucleus.kit.edit.base ADMIN Allows the user to run the command /kit edit
nucleus.kit.exempt.cooldown ADMIN Allows the user to bypass kit cooldowns.
nucleus.kit.exempt.onetime ADMIN Allows the user to use one time kits multiple times.
nucleus.kit.exempt.warmup ADMIN Allows the user to bypass the warmup for /kit
nucleus.kit.give.base ADMIN Allows the user to run the command /kit give
nucleus.kit.give.exempt.cooldown ADMIN Allows the user to bypass the cooldown for /kit give
nucleus.kit.give.exempt.cost ADMIN Allows the user to bypass the cost for /kit give
nucleus.kit.give.exempt.warmup ADMIN Allows the user to bypass the warmup for /kit give
nucleus.kit.give.overridecheck ADMIN Allows the user to grant kits to those who would not ordinarily be able to obtain a kit using the -i flag.
nucleus.kit.hidden.base ADMIN Allows the user to run the command /kit hidden
nucleus.kit.info.base ADMIN Allows the user to run the command /kit info
nucleus.kit.list.base USER Allows the user to run the command /kit list
nucleus.kit.onetime.base ADMIN Allows the user to run the command /kit onetime
nucleus.kit.permissionbypass.base ADMIN Allows the user to run the command /kit permissionbypass
nucleus.kit.remove.base ADMIN Allows the user to run the command /kit remove
nucleus.kit.rename.base ADMIN Allows the user to run the command /kit rename
nucleus.kit.resetusage.base ADMIN Allows the user to run the command /kit resetusage
nucleus.kit.set.base ADMIN Allows the user to run the command /kit set
nucleus.kit.setcooldown.base ADMIN Allows the user to run the command /kit setcooldown
nucleus.kit.setfirstjoin.base ADMIN Allows the user to run the command /kit setfirstjoin
nucleus.kit.showhidden ADMIN Shows the user hidden kits in /kits
nucleus.kit.toggleredeemmessage.base ADMIN Allows the user to run the command /kit toggleredeemmessage
nucleus.kit.view.base ADMIN Allows the user to run the command /kit view
nucleus.kits ADMIN Allows the user to use all kits.
The following configuration is the default for this module:
# If true, any items that couldn't be placed in the player's inventory will be dropped on the floor around them.
drop-items-if-inventory-full=false
# If this is true, "drop-items-if-inventory-full" will be ignored, and the kit will only be consumed if everything can be consumed.
must-get-all-items=false
# If true, any tokens such as {{name}} and {{displayname}} will be translated on item names and lore, if they exist, when kits are redeemed.
process-tokens-in-lore=false