Add HiddenPotionEffect API

This commit is contained in:
Tamion
2023-11-05 09:50:48 +01:00
parent 27a62b6b53
commit 0a1e7d6d0f
2 changed files with 63 additions and 13 deletions

View File

@@ -591,6 +591,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
/**
* Adds the given {@link PotionEffect} to the living entity.
* <p>
* Note: {@link PotionEffect#getHiddenPotionEffect()} is ignored when
* adding the effect to the entity.
*
* @param effect PotionEffect to be added
* @return whether the effect could be added
@@ -615,6 +618,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
/**
* Attempts to add all of the given {@link PotionEffect} to the living
* entity.
* <p>
* Note: {@link PotionEffect#getHiddenPotionEffect()} is ignored when
* adding the effect to the entity.
*
* @param effects the effects to add
* @return whether all of the effects could be added