Modules

Friendly Fire

Allows teammates to kill each other. Arrows will be absorbed if they hit a teammate.

<friendlyfire>on</friendlyfire> <!-- Defaults to off -->

Refunds arrows blocked by teammates from non-infinity bows.

<friendlyfirerefund>off</friendlyfirerefund> <!-- Defaults to on -->


Difficulty

The difficulty level can be set to peaceful, easy, normal, or hard. The default is hard.

<difficulty>easy</difficulty> <!-- Defaults to hard -->


Hunger

Specify if a player can starve to death, usually used with the difficulty setting.
This can also be accomplished with the naturalRegeneration gamerule.

<hunger>
    <depletion>off</depletion>
</hunger>


Damage Filtering

This module is used to filter when or if damage is applied to entities. Its contents can be a filter or combination of filters. It doesn’t have to be <allow> and <deny> at the top level but that’s usually what you want. Regions can also be used since they are filters that filter for a location.

Examples

<damage>
    <deny>
        <cause>explosion</cause>
    </deny>
</damage>

<!-- Deny damage events where the attacker is on the red team -->
<damage>
    <deny>
        <attacker>
            <team>red</team>
        </attacker>
    </deny>
</damage>


Disable Damage

Use this module to disable damage from specific causes.

While almost every form of damage can be disabled safely it is recommended that you do not disable VOID damage.

Disable Damage Element Description
<disabledamage> </disabledamage> Node containing the disabled damage types.
Sub-elements Value/Children
<damage> </damage> The damage type that is disabled. Damage Cause

Example

<disabledamage>
    <!-- Disable fall damage -->
    <damage>fall</damage>
</disabledamage>


Block Explosion Attributes

The BLOCK_EXPLOSION damage cause has several extended attributes to customize who/what gets damaged. Only attributes with false as the value need to be explicitly defined since all attributes default to true.

Attribute Description Value Default
ally Damage to players on the same team as the person that caused the explosion. true/false true
self Damage to the person that caused the explosion. true/false true
enemy Damage to players not on the same team as the person that caused the explosion. true/false true
other Any other damage caused by the explosion. true/false true

Example

<disabledamage>
    <!-- TNT damages enemies and self, but not teammates -->
    <damage ally="true" self="false" enemy="false" other="false">block explosion</damage>
</disabledamage>


Damage Causes

The following damage causes can be used in the disable damage module. These causes do not need to be capitalized or contain underscores, i.e., FIRE_TICK and fire tick will both work.

Name Description
CONTACT Damage caused when an entity contacts a block such as a Cactus.
ENTITY_ATTACK Damage caused when an entity attacks another entity.
PROJECTILE Damage caused when attacked by a projectile.
SUFFOCATION Damage caused by being put in a block.
FALL Damage caused when an entity falls a distance greater than 3 blocks.
FIRE Damage caused by direct exposure to fire.
FIRE_TICK Damage caused due to burns caused by fire.
MELTING Damage caused due to a snowman melting.
LAVA Damage caused by direct exposure to lava.
DROWNING Damage caused by running out of air while in water.
BLOCK_EXPLOSION Damage caused by being in the area when a block explodes.
ENTITY_EXPLOSION Damage caused by being in the area when an entity, such as a Creeper, explodes.
VOID Damage caused by falling into the void.
LIGHTNING Damage caused by being struck by lightning.
SUICIDE Damage caused by committing suicide using the command "/kill".
STARVATION Damage caused by starving due to having an empty hunger bar.
POISON Damage caused due to an ongoing poison effect.
MAGIC Damage caused by being hit by a damage potion or spell.
WITHER Damage caused by Wither potion effect.
FALLING_BLOCK Damage caused by being hit by a falling block which deals damage.
THORNS Damage caused in retaliation to another attack by the Thorns enchantment.
CUSTOM Custom damage.

Copied from: bukkit docs - Damage Cause