[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.

Generated at Thu Mar 27 19:13:49 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.