Package io.papermc.paper.potion
Interface SuspiciousEffectEntry
public sealed interface SuspiciousEffectEntry
Represents a
PotionEffectType
paired with a duration.-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull SuspiciousEffectEntry
create
(@NotNull PotionEffectType effectType, int duration) Creates a new instance of SuspiciousEffectEntry.int
duration()
Gets the duration for this effect instance.effect()
Gets the effect type.
-
Method Details
-
effect
Gets the effect type.- Returns:
- type
-
duration
int duration()Gets the duration for this effect instance.- Returns:
- duration (in ticks)
-
create
@Contract(value="_, _ -> new", pure=true) @NotNull static @NotNull SuspiciousEffectEntry create(@NotNull @NotNull PotionEffectType effectType, int duration) Creates a new instance of SuspiciousEffectEntry.- Parameters:
effectType
- effect typeduration
- duration (in ticks)- Returns:
- new instance of an entry
-