Package me.keehl.elevators.api.models
Interface IElevatorEffect
-
- All Known Implementing Classes:
ElevatorEffect
public interface IElevatorEffectRepresents a visual/audio effect that can be played for an elevator interaction.Effects are identified by a server-wide key and may be displayed in user interfaces using an icon.
Contract:
getEffectKey()is nevernullor empty.getIcon()is nevernull.playEffect(IElevatorEventData, IElevator)may produce world effects (particles, sounds, etc.).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull java.lang.StringgetEffectKey()Returns the server-wide key that identifies this effect.@NotNull org.bukkit.inventory.ItemStackgetIcon()Returns the icon used to represent this effect in UIs.voidplayEffect(@NotNull IElevatorEventData teleportResult, @NotNull IElevator elevator)Plays this effect for the given event and elevator.
-
-
-
Method Detail
-
getEffectKey
@NotNull @NotNull java.lang.String getEffectKey()
Returns the server-wide key that identifies this effect.- Returns:
- the non-null effect key
-
getIcon
@NotNull @NotNull org.bukkit.inventory.ItemStack getIcon()
Returns the icon used to represent this effect in UIs.- Returns:
- the non-null icon
-
playEffect
void playEffect(@NotNull @NotNull IElevatorEventData teleportResult, @NotNull @NotNull IElevator elevator)Plays this effect for the given event and elevator.This method may spawn particles, play sounds, or otherwise interact with the world.
- Parameters:
teleportResult- non-null event context describing the elevator interaction/teleportelevator- non-null elevator instance- Throws:
java.lang.NullPointerException- if any argument isnull
-
-