Damage

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 ElementDescriptionValue/Children
Node containing the disabled damage types.
Sub-elements
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.

AttributeDescriptionValueDefault
Damage to players on the same team as the person that caused the explosion.true/falsetrue
Damage to the person that caused the explosion.true/falsetrue
Damage to players not on the same team as the person that caused the explosion.true/falsetrue
Any other damage caused by the explosion.true/falsetrue

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.

NameDescription
Damage caused when an entity contacts a block such as a Cactus.
Damage caused when an entity attacks another entity.
Damage caused when attacked by a projectile.
Damage caused by being put in a block.
Damage caused when an entity falls a distance greater than 3 blocks.
Damage caused by direct exposure to fire.
Damage caused due to burns caused by fire.
Damage caused due to a snowman melting.
Damage caused by direct exposure to lava.
Damage caused by running out of air while in water.
Damage caused by being in the area when a block explodes.
Damage caused by being in the area when an entity, such as a Creeper, explodes.
Damage caused by falling into the void.
Damage caused by being struck by lightning.
Damage caused by committing suicide using the command "/kill".
Damage caused by starving due to having an empty hunger bar.
Damage caused due to an ongoing poison effect.
Damage caused by being hit by a damage potion or spell.
Damage caused by Wither potion effect.
Damage caused by being hit by a falling block which deals damage.
Damage caused in retaliation to another attack by the Thorns enchantment.
Custom damage.

Copied from: bukkit docs - Damage Cause