Kits are groups of items and effects that can be given to players in various ways. There are many types of kits, and they can be packaged together in any combination.
Kits can be given an id
attribute, which is used to refer to them in other places.
Kits can contain other kits directly, and can also inherit items from other kits through the parents=""
attribute.
Some types of kits are removable, meaning that the kit can be automatically taken from the player as well as given. When used in certain contexts, these kits will be automatically removed from the player at an appropriate time. This will be noted in the documentation where applicable.
Element | Description |
---|---|
<kit> </kit>
|
A kit node, containing specific kit types and/or other kit nodes. |
Attribute | Description | Value | Default |
---|---|---|---|
id
|
Unique identifier used to reference this kit from other places in the XML. | String | |
filter
|
Property Filter when this kit is used. | Filter | |
give
|
Property Dynamic filter used to apply the kit. | Dynamic Filter | |
take
|
Property Dynamic filter used to remove the kit. | Dynamic Filter | |
lend
|
Property
Kit is applied when the dynamic filter returns allow and removed when it is deny.
Cannot combine lend property with give or take
|
Dynamic Filter | |
parents
|
The kit's parent or a comma separated list of parent kits. | String | |
force
|
Force apply the kit. | true/false | |
potion-particles
|
Enable or disable potion particles.
Potion particles are disabled for all players by default. |
true/false | false |
reset-ender-pearls
|
Reset any ender pearls the player might have thrown before the kit was applied. | true/false | false |
The effect of the force
attribute depends on the type of kit it is used with:
conflicting items or armor will be replaced instead of smartly merged & repaired,
health & hunger will be set instead of only increased,
and potion effects can be replaced with the same effect at a lower level or shorter duration.
<kits>
<kit id="spawn" force="true">
<item slot="0" material ="iron sword"/>
<item slot="8" amount="32" material="bread"/>
<effect duration="5" amplifier="1">instant_health</effect>
</kit>
<kit id="red" parents="spawn">
<helmet color="cd0000" material="leather helmet"/>
</kit>
<kit id="blue" parents="spawn">
<helmet color="0066cc" material="leather helmet"/>
</kit>
</kits>
In the example above players from blue team will get a blue helmet, players from red team will get a red helmet; both teams will get the items from the spawn kit. The spawn kit contains a 5 second healing potion to help prevent spawn killing.
Kits can place items in specific slots of a player’s inventory, and equip them with armor. See Items & Armor for details.
Item kits will replace any items in the player’s inventory in slots present in the kit, but they will not alter any other slots. If you want to guarantee that a slot is empty, put an item called “air” in that slot. You can also clear the player’s entire inventory before applying the kit by using one of the elements below.
Element | Description |
---|---|
<clear/>
|
Clear the all of the player's inventory including armor slots. |
<clear-items/>
|
Clear only the player's item slots. |
<kit id="ender" reset-ender-pearls="true">
<item slot="0" amount="1" material="ender pearl"/>
<clear/>
</kit>
A player’s gamemode can be changed when they spawn or enter a region, etc. by using this kit.
Element | Description | Value |
---|---|---|
<game-mode> </game-mode>
|
The gamemode to change the player to.
Accepts creative , survival , spectator & adventure .</br>
|
Game Mode String |
<game-mode>adventure</game-mode>
A player’s health and hunger can be modified with kits, this can be useful on maps with the naturalRegeneration
gamerule set to false.
By default health or hunger values are only increased, not decreased. For example, a player with 5 hearts (10 points) will not get a 5 health point kit applied, however a 20 point kit will be applied. This can be overwritten with a kits force="true"
attribute.
Element | Description | Value |
---|---|---|
<health> </health>
|
Health value in 1/2 heart increments. | 1 - 20 |
<saturation> </saturation>
|
Food saturation, always equal to or less than the player's food level. | Decimal |
<foodlevel> </foodlevel>
|
Food level in 1/2 drumstick increments. | 0 - 20 |
<kit id="health" force="true">
<health>10</health>
</kit>
<kit id="hunger">
<saturation>20</saturation>
<foodlevel>20</foodlevel>
</kit>
Potion effects can be applied and removed with a kit. See Potion Effects for details about the <effect>
element.
<kit>
<effect duration="10" amplifier="4">resistance</effect>
</kit>
Attribute modifiers can be applied directly to players through a kit. Modifying attributes in this way, instead of through an item, is a simple way to ensure that the player cannot avoid the effect of the modifier.
The only way to remove an attribute modifier is by removing the kit that applied it. A kit cannot affect a modifier applied by a different kit.
Attribute Operations
add
Add amountbase
Multiply amount by base value and add itmultiply
Multiply by amountElement | Description |
---|---|
<attribute> </attribute>
|
Attribute name |
Attribute | Description | Value | Default |
---|---|---|---|
amount
|
Numeric parameter | Decimal | |
operation
|
Modifier operation | add / base / multiply |
add
|
<kit>
<attribute operation="add" amount="0.5">generic.movementSpeed</attribute>
</kit>
Increase or decrease a player’s walking speed. The value is a multiplier of the normal walking speed.
Element | Description | Value |
---|---|---|
<walk-speed> </walk-speed>
|
Increase or decrease a player's walking speed. | 0 - 5.0 |
<kit id="rabbit">
<!-- 1.8 times faster than a normal player -->
<walk-speed>1.8</walk-speed>
</kit>
<kit id="tortoise">
<!-- half as fast as a normal player -->
<walk-speed>0.5</walk-speed>
</kit>
Reduce (or increase) the knockback players receive when they have this kit applied.
The normal input range is 0 - 1.0
. If the value is greater than one the knockback will be increased,
and anything lower than zero pushes the player to the attacker instead of away from them.
Element | Description | Value |
---|---|---|
<knockback-reduction> </knockback-reduction>
|
Knockback reduction amount | Number |
<kit>
<knockback-reduction>0.5</knockback-reduction>
</kit>
The shield kit gives the player a shield consisting of absorption hearts that recharge after a set period of time. Recharging of the shield is based on when damage was taken last, every time a player is damaged it resets the recharge timer.
Element | Description |
---|---|
<shield health="4" delay="4s"/>
|
Give the player a recharging shield of absorption hearts. |
Attribute | Description | Value | Default |
---|---|---|---|
health
|
Amount of extra absorption hearts to give to the player. | Decimal | 4 |
delay
|
Time to wait after a player is last damaged to recharge the shield. | Time Period | 4s |
<kit>
<shield health="4" delay="8s"/>
</kit>
Give players with this kit the ability to double-jump. This element’s enabled attribute can be used to disable double-jump inside regions, etc.
Element | Description |
---|---|
<double-jump/>
|
Give player the double-jump ability. |
Attribute | Description | Default | |
---|---|---|---|
enabled
|
Enable or disable double-jump. | true/false | true |
power
|
Power of the double jump (a normal player jump is about 1) | Number | 3 |
recharge-time
|
Recharge time till the player can double jump again. | Time Period | 2.5s |
recharge-before-landing
|
Player starts recharging before they land from their previous jump. | true/false | false |
<kit>
<double-jump recharge-before-landing="true"/>
</kit>
The fly kit gives players which it is applied to the ability to fly. It also allows modification of the speed at which they fly. If no attributes are specified can-fly defaults to true.
Element | Description |
---|---|
<fly/>
|
Control the player's flying ability |
Attribute | Description | Default | |
---|---|---|---|
can-fly
|
Set if the player can fly. | true/false | true |
flying
|
Set if the player is currently flying.
To enable flying can-fly
can not be set to false.
|
true/false | |
fly-speed
|
Set the fly speed multiplier. | 0 - 10 | 1 |
<kit id="fly">
<fly/> <!-- Allow player to fly -->
<fly can-fly="false"/> <!-- Don't allow player to fly -->
<fly flying="true"/> <!-- Make the player fly right away -->
<fly flying="false"/> <!-- Make the player stop flying right away -->
</kit>