Comment on page
Targets
Targets are the entities or blocks that will be affected by an ability. Examples of targets include the player using the ability, the victim of an attack, or a block that has been broken.
Here are some examples of targets:
@Victim
: Applies the effect to the victim of an event (such as an attack).@Attacker
: Applies the effect to the attacker of an event (such as an attack).@Block
: Applies the effect to the block that was interacted with (such as right-clicking).@NearestPlayer{radius=0}
: Applies the effect to the nearest player within the specified radius.
You can use multiple targets in a single effect, separated by a comma. For example:
@Victim, @Attacker
would apply the effect to both the victim and the attacker of an event.Targets can be configured with additional options. For example, you can use the
radius
option to specify the radius around a target to search for another target.Here's an example of a target configuration using the
radius
option:effects:
- 'MESSAGE:you are the nearest player! @NearestPlayer{radius=10}'
This would apply the effect to the nearest player within a radius of 10 blocks.
You can use
r
instead of radius
, d
instead of distance
or t
instead of target
when defining a target in effect.Here is a table of all available targets, along with their descriptions:
Name | Description |
---|---|
@Victim | Applies the effect to the victim of an event (such as an attack). |
@Attacker | Applies the effect to the attacker of an event (such as an attack). |
@Self | Applies the effect to main entity (who activated it) |
@Block | Applies the effect to the block that was interacted with (such as right-clicking). |
@NearestPlayer{radius=0} | Applies the effect to the nearest player within the specified radius. |
@EyeHeight | Applies the effect at entity's eye location |
@Trench{radius=x} | Applies effect in square (e.g. 3x3x3) size area (commonly used for Trench) |
@BlockInDistance{distance=1} | Gets block within distance (closest one or the furthest away location if no block is within distance) |
@Veinmine | Vein mine blocks. You must define whitelist of materials in settings.whitelist in the same block as chance, cooldown, etc.. Example here. |
@Add{x=0.0,y=0.0,z=0.0} | Add distance to main entity's location |
@Aoe{radius=1,target=all} | Area of effect target. Radius is in what radius around a location entities are searched for. Targets are:
- ALL
- MOBS
- DAMAGEABLE (all entities that can damaged by user)
- UNDAMAGEABLE (all entities that can't be harmed by user, e.g. allies)
--------------------------------------------
You can also define a limit for number of entities affected adding option e.g. limit=1 |
Last modified 1mo ago