[SPIGOT-1357] Add potion effect colors to the API Created: 19/Dec/15 Updated: 27/Apr/16 Resolved: 22/Dec/15 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | New Feature | Priority: | Minor |
Reporter: | blablubbabc | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None |
Description |
Every potion effect type has a certain fixed color, which can for example be found in the minecraft wiki: http://minecraft.gamepedia.com/Data_values#Status_effects It might be useful for plugins to know these colors. A good place for adding them to the API might be as Color attribute of PotionEffectType. |
Comments |
Comment by blablubbabc [ 27/Apr/16 ] |
Sorry to comment on this so late, but the new constructor with the new color attribute (https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/02797db500dcaf3a9c97aa70f82ed5100d386a45) is never called anywhere yet, no? So currently PotionEffect#getColor() will always return null for PotionEffects created by the API itself. I would have expected that the default effect colors get passed to this somewhere, for example when creating a PotionEffect from a PotionEffectType: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/potion/PotionEffectType.java?at=73090659cd1be68f81662ea6d7035d6336e54857#165 Or that PotionEffect would figure out its color itself if none is specified. Edit: |
Comment by md_5 [ 22/Dec/15 ] |
Added to 1.9 |