-
Notifications
You must be signed in to change notification settings - Fork 13
PotionEffect
Xemor edited this page May 19, 2021
·
9 revisions
This skill allows you to apply a potion effect to someone when they acquire the hero. The skill takes in three parameters from the config:
- type (the type of potion effect to apply, for example if it is regeneration, it would apply regeneration)
- potency (the strength of the potion, if the potency is 2, it would cause regeneration 2 for example)
- duration (the duration for the potion effect to last)
If the type is not specified, it defaults to regeneration.
If the potency is not specified, it defaults to 1.
If the duration is not specified, it defaults to lasting "forever" (actually 1200 days~, but good enough)
Example
//Notice how it says "INCREASE_DAMAGE" rather than Strength, the vanilla minecraft names don't always work! Read below.
speed:
skill: POTIONEFFECT
type: INCREASE_DAMAGE
potency: 2
The type of the potion effect is loaded in using the Spigot API's PotionEffectType Enum, this means you need to refer to potion effects by their name in that enum. https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html