Zap Spell - MomoPewpew/MagicSpells GitHub Wiki

Source Code

spell-class: ".targeted.ZapSpell"

Description:

A targeted spell that instantly breaks the block the caster is looking at.

Configuration:

Option Description Default Value
allowed-block-types A list of allowed block types to break. null
disallowed-block-types A list of block types not allowed to be broken. "bedrock, lava, water"
str-cant-zap Message to send when the caster is unable to zap the targeted block. ""
drop-block Whether to drop the block or not. false
drop-normal Whether to drop the normal type of that block. true
check-plugins Check block-related plugins? true
play-break-effect Whether to play the block break effect when cast. true

Example:

zap:
    spell-class: ".targeted.ZapSpell"
    name: zap
    cast-item: stick
    cooldown: 1
    allowed-block-types: []
    disallowed-block-types: [air, bedrock]
    drop-block: false
    drop-normal: true
    check-plugins: true
    range: 15
    cost:
        - mana 5
    str-cost: 5 mana
    str-cast-self: You zapped a block.
    str-cant-zap: You can't zap that.
    str-no-target: No target found.