TotemSpell - TheComputerGeek2/MagicSpells GitHub Wiki

Source Code

spell-class: ".targeted.TotemSpell"

targeting cast argument values:

Value Supported
entity false
location true
entity_from_location false

Spell Effect Positions:

  • disabled - Plays the effect at the totem's location when the spell ends.
  • special - Plays the effect at the totem's location on every activation.

Description:

Totem spell spawns an armor stand which can pulse spells.

Configuration:

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

Option Description Type Default Supports expressions
main-hand Magic Item String false
off-hand Magic Item String false
helmet Magic Item String false
chestplate Magic Item String false
leggings Magic Item String false
boots Magic Item String false
y-offset Integer 0 true
interval The time in ticks between each spell cast the totem makes. Integer 30 true
max-duration The maximum ticks the totem can be alive for before it vanishes. Integer 0 true
total-pulses Defines how many times the totem should attempt to cast its spells before expiring. Integer 5 true
cap-per-player How many totems each player can have at once. Integer 10 false
max-distance The maximum amount of blocks the player can be from their totem before it vanishes. Double 30 true
marker When set to true the armor stand's hitbox is set to 0 and the interaction with it is disabled. Boolean false true
gravity Defines if the gravity should be applied to the armor stand. Boolean false true
visible Defines if the armor stand should be visible. Boolean true true
targetable Defines if the the armor stand should be targetable. Boolean true true
totem-name-visible This toggles the visibility of the custom name - in case the totem is named for targeting purposes (modifiers). Boolean true true
only-count-on-success If true, only successfully cast spells (requiring targets, as an example) will count towards total-pulses. Useful in making trap-style spells. Boolean false true
center-stand Defines whether the armor stand should be centered within its block location. Boolean true true
allow-caster-target Defines whether the caster should be able to target the totem with his spells. Boolean false true
silenced Defines if the armor stand should be silent. Boolean false true
str-at-cap String message for if the player has the maximum amount of totems out already. Rich Text "You have too many effects at once." true
totem-name The entity's custom name. Rich Text true
spells Sub-spell list to pulse through. String List false
spell-on-break Sub-spell the totem should cast if it is broken. String false
spell-on-spawn Sub-spell which is cast on spawn with the entity or its location as the target if applicable. String false

Example:

Totem:
    spell-class: ".targeted.TotemSpell"
    range: 3
    cooldown: 12
    permission-name: totem
    total-pulses: 2
    interval: 5
    max-distance: 500
    helmet: GLASS
    totem-name: "&6Totem of Pain"
    only-count-on-success: true
    str-at-cap: "You can only control 2 totems at once!"
    cap-per-player: 2
    spells:
        - AOE_TOTEM

AOE_TOTEM:
    spell-class: ".targeted.AreaEffectSpell"
    helper-spell: true
    permission-name: totem
    horizontal-radius: 10
    vertical-radius: 10
    can-target: players,nonplayers
    spells:
        - DOT_TOTEM

DOT_TOTEM:
    spell-class: ".targeted.DotSpell"
    helper-spell: true
    permission-name: totem
    delay: 5
    interval: 20
    duration: 200
    damage: 1
    prevent-knockback: true 
    can-target: players,nonplayers