I have a few questions about potion effects:
-
How can I detect if a player has a specific potion, like regeneration:
-
How can I remove a specific potion from a player:
I have a few questions about potion effects:
How can I detect if a player has a specific potion, like regeneration:
How can I remove a specific potion from a player:
I belive it is something like
PotionEffectData data = player.getOrCreate(PotionEffectData.class).get();
ListValue<PotionEffect> effects = data.effects();
From there you just manipulate the potion effect data.
Or, for a simpler approach,
List<PotionEffect> effects = player.get(Keys.POTION_EFFECTS).get();