Name | potion_effects |
Object | ItemTag |
Input | ListTag |
Related Tags | <ItemTag.effects_data> Returns a list of all potion effects on this item, in the same format as the MapTag input to the mechanism. (...)
<server.potion_types> Returns a list of all potion types known to the server. (...)
<server.potion_effect_types> Returns a list of all potion effects known to the server. (...)
|
Description | Sets the item's potion effect(s).
This applies to Potion items, Tipped Arrow items, and Suspicious Stews. For potions or tipped arrows (not suspicious stew), the first item in the list must be a MapTag with keys: "base_type" - from https://minecraft.wiki/w/Potion#Item_data For example: [base_type=strong_swiftness] This example produces an item labeled as "Potion of Swiftness - Speed II (1:30)" Each following item in the list are potion effects, which must be a MapTag with keys: "type" - from https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html "amplifier" - number to increase the level by (0 for default level 1) (optional, default 0) "duration" - DurationTag, how long it lasts (optional, default 0s) "ambient", "particles", "icon" - booleans (optional, default true, true, false) For example: [type=SPEED;amplifier=2;duration=10s;ambient=false;particles=true;icon=true] This example would be a level 3 swiftness potion that lasts 10 seconds. A very short full default potion item would be: potion[potion_effects=[base_type=regeneration] A (relatively) short full potion item would be: potion[potion_effects=<list[[base_type=regeneration]|[type=speed;duration=10s]]>] (Note the list constructor to force data format interpretation, as potion formats can be given multiple ways and the system will get confused without a constructor) |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L233 |