Interface IElevatorEffect

  • All Known Implementing Classes:
    ElevatorEffect

    public interface IElevatorEffect
    Represents 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:

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      @NotNull java.lang.String getEffectKey()
      Returns the server-wide key that identifies this effect.
      @NotNull org.bukkit.inventory.ItemStack getIcon()
      Returns the icon used to represent this effect in UIs.
      void playEffect​(@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/teleport
        elevator - non-null elevator instance
        Throws:
        java.lang.NullPointerException - if any argument is null