DisarmSpell - TheComputerGeek2/MagicSpells GitHub Wiki
spell-class: ".targeted.DisarmSpell"
targeting
cast argument values:
Value | Supported |
---|---|
entity |
true |
location |
false |
entity_from_location |
false |
Description:
Targeted spell that removes the target's held item.
Configuration:
Since 4.0 Beta 13 some of these options support dynamic values through numeric or string expressions.
Option | Description | Type | Default | Supports expressions |
---|---|---|---|---|
disarmable-items |
List every item with the Magic Item String format you want to be disarmable via this spell. Leave blank to disarm all items. | String List | false |
|
disarm-duration |
How long the disarm lasts in ticks. If dont-drop is false, will prevent the item from being picked back up by the target for the duration. |
Integer | 100 |
true |
dont-drop |
If true, the item will simply vanish, then reappear in the chosen slot. If false, the item will drop on the ground and have to be picked up again by the target. | Boolean | false |
true |
prevent-theft |
If true, this will prevent anyone but the targeted player from picking up the dropped item. | Boolean | true |
true |
str-invalid-item |
String message, sent to the caster if the target's held item cannot be disarmed. | Rich Text | "Your target could not be disarmed." |
true |
Example:
Disarm:
spell-class: ".targeted.DisarmSpell"
cooldown: 15
disarm-duration: 100
dont-drop: true
prevent-theft: true
range: 10
cost:
- mana 40
str-cost: 40 mana
str-no-target: "No target."
str-invalid-item: "Your target could not be disarmed."
str-cast-self: "You disarmed %t."
str-cast-target: "%a disarms you."
disarmable-items:
- blaze_rod
- stick
- book
- bone
- wood_sword
- wood_pickaxe
- golden_apple
- pumpkin_seeds