Entity Edit Spell - TheComputerGeek2/MagicSpells GitHub Wiki

Source Code

spell-class: ".targeted.EntityEditSpell"

targeting cast argument values:

Value Supported
entity true
location false
entity_from_location false

Description:

You can edit the entity's attributes using this spell.

Configuration:

Since 4.0 Beta 13 some of these options support dynamic values through numeric or string expressions.

Option Description Type Default Supports expressions
attributes Attributes false
force Since 4.0 Beta 16. When enabled, attribute types not normally present on an entity are forcefully registered, allowing normally incompatible modifiers to be applied. Any attributes added this way will use the attribute's default base value. Boolean false true
remove Since 4.0 Beta 16. Removes attributes instead of applying them when enabled. Boolean false true
toggle Toggles the applied modification. Boolean false true
permanent Since 4.0 Beta 16. When disabled, attributes added by the spell no longer save with the entity. These attributes persist when the plugin unloads. Boolean true true

Example:

speed:
    spell-class: ".targeted.EntityEditSpell"
    always-granted: true
    cast-item: stick
    toggle: false
    attributes:
      - generic_movement_speed 1 add_number