Class PotionZoneEffect
java.lang.Object
fr.multimc.api.spigot.common.worlds.locations.zones.effects.effects.PotionZoneEffect
- All Implemented Interfaces:
IZoneEffect
This class represents a zone effect that applies a potion effect to players or entities.
-
Constructor Summary
ConstructorsConstructorDescriptionPotionZoneEffect(org.bukkit.potion.PotionEffectType effectType, int level, int duration, boolean particules) Constructs a new potion zone effect. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyEffect(MmcPlayer player) Applies the potion effect to the given player.voidapplyEffect(org.bukkit.entity.Entity entity) Applies the potion effect to the given entity.voidremoveEffect(MmcPlayer player) Removes the potion effect from the given player.voidremoveEffect(org.bukkit.entity.Entity entity) Removes the potion effect from the given entity.
-
Constructor Details
-
PotionZoneEffect
public PotionZoneEffect(org.bukkit.potion.PotionEffectType effectType, int level, int duration, boolean particules) Constructs a new potion zone effect.- Parameters:
effectType-PotionEffectTypeof potion effect to applylevel- the level of the potion effectduration- the duration of the potion effect, in ticksparticules- whether to display particles for the potion effect
-
-
Method Details
-
applyEffect
Applies the potion effect to the given player.- Specified by:
applyEffectin interfaceIZoneEffect- Parameters:
player-MmcPlayerto apply the effect to
-
removeEffect
Removes the potion effect from the given player.- Specified by:
removeEffectin interfaceIZoneEffect- Parameters:
player-MmcPlayerto remove the effect from
-
applyEffect
public void applyEffect(org.bukkit.entity.Entity entity) Applies the potion effect to the given entity.- Specified by:
applyEffectin interfaceIZoneEffect- Parameters:
entity-Entityto apply the effect to
-
removeEffect
public void removeEffect(org.bukkit.entity.Entity entity) Removes the potion effect from the given entity.- Specified by:
removeEffectin interfaceIZoneEffect- Parameters:
entity-Entityto remove the effect from
-