Recall Spell - MomoPewpew/MagicSpells GitHub Wiki

Source Code

spell-class: ".instant.RecallSpell"

Description:

An instant spell that teleports the caster to the location they marked with the Mark Spell.

Configuration:

Option Description Default Value
mark-spell The internal name (the config header key name) of the Mark Spell that this spell is associated with. mark
max-range The max range a player can be from their mark to teleport to it. A value of 0 is infinite range. 0
use-bed-location If this is true, the caster will be teleported to their bed location instead of a location marked with the Mark Spell. false
allow-cross-world Whether a player can recall to a mark in a different world than the one they are currently in. true
str-no-mark Message that appears if the caster has no mark to teleport to. You have no mark to recall to.
str-too-far Message that appears if the max-range is greater than 0 and the player is too far away from their mark. Your mark is too far away.
str-other-world Message that appears if allow-cross-world is false and the player is in the wrong world. Your mark is in another world.
str-recall-failed Message that appears if the recall fails (generally if it is blocked by another plugin). Could not recall.

Example:

recall:
    spell-class: ".instant.RecallSpell"
    name: recall
    spell-icon: compass
    description: Teleports you to your marked location.
    cast-item: stick
    cooldown: 300
    mark-spell: mark
    max-range: -1
    allow-cross-world: true
    use-bed-location: false
    cost:
        - mana 75
    str-cost: 75 mana and 1 iron bar
    str-cast-self: You teleport to your marked location.
    str-no-mark: You have not marked a location to recall to.
    str-other-world: You cannot recall to another world.
    str-too-far: Your marked location is too far away.
    str-cast-others: "%a disappears!"