Package noppes.npcs.api.handler.data
Interface IPlayerEffect
-
public interface IPlayerEffectRepresents an active custom effect instance on a player.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetDuration()intgetId()intgetIndex()bytegetLevel()StringgetName()voidkill()Removes this effect from the player.voidperformEffect(IPlayer player)Applies this effect's tick logic to the given player.voidsetDuration(int duration)voidsetIndex(int index)voidsetLevel(byte level)
-
-
-
Method Detail
-
kill
void kill()
Removes this effect from the player.
-
getId
int getId()
- Returns:
- the custom effect ID.
-
getDuration
int getDuration()
- Returns:
- the remaining duration in seconds (-100 for infinite).
-
setDuration
void setDuration(int duration)
- Parameters:
duration- the remaining duration in seconds (-100 for infinite).
-
getLevel
byte getLevel()
- Returns:
- the effect level/amplifier.
-
setLevel
void setLevel(byte level)
- Parameters:
level- the effect level/amplifier.
-
getName
String getName()
- Returns:
- the display name of the effect.
-
performEffect
void performEffect(IPlayer player)
Applies this effect's tick logic to the given player.- Parameters:
player- the player to apply the effect to.
-
getIndex
int getIndex()
- Returns:
- the effect source index (0: CNPC+, 1: DBC Addon).
-
setIndex
void setIndex(int index)
- Parameters:
index- the effect source index (0: CNPC+, 1: DBC Addon).
-
-