[SPIGOT-2578] Missing LivingEntity#getPotionEffect(PotionEffectType) Created: 06/Aug/16 Updated: 07/Aug/16 Resolved: 07/Aug/16 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | New Feature | Priority: | Minor |
Reporter: | _ | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | entity, potioneffect |
Description |
The LivingEntity interface is lacking a method to retrieve an active PotionEffect directly by its PotionEffectType. This is otherwise only achievable by matching the PotionEffectType of the PotionEffects returned by the LivingEntity#getActivePotionEffects method, which in inconvenient, and less efficient than getting the PotionEffect directly. Some applicable purposes of this is updating a player according to their active PotionEffects. |
Comments |
Comment by md_5 [ 07/Aug/16 ] |
Implemented |
Comment by md_5 [ 06/Aug/16 ] |
Fair chance that the implementation of this method would have to do just as you described. |