Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface VisibilityManager

This object is used to manage the visibility of a hologram. It allows to hide/show the hologram to certain players, and the default behaviour (when a hologram is not specifically being hidden/shown to a player) can be customized.

Hierarchy

  • VisibilityManager

Index

Methods

hideTo

  • hideTo(player: BukkitPlayer): void
  • Hides the hologram to a player, overriding the value of {@link #isVisibleByDefault()}. This is persistent if the players goes offline.

    Parameters

    • player: BukkitPlayer

      the involved player

    Returns void

isVisibleByDefault

  • isVisibleByDefault(): boolean
  • Returns if the hologram is visible by default. If not changed, this value is true by default so the hologram is visible to everyone.

    Returns boolean

    if the hologram hologram is visible by default

isVisibleTo

  • isVisibleTo(player: BukkitPlayer): boolean
  • Checks if a hologram is visible to a player.

    Parameters

    • player: BukkitPlayer

      the involved player

    Returns boolean

    if the player can see the hologram

resetVisibility

  • resetVisibility(player: BukkitPlayer): void
  • Resets the visibility to the default value. If you previously called {@link #showTo(Player)} or {@link #hideTo(Player)} to override the default visibility, this method will reset it to reflect the value of {@link #isVisibleByDefault()}.

    Parameters

    • player: BukkitPlayer

      the involved player

    Returns void

resetVisibilityAll

  • resetVisibilityAll(): void

setVisibleByDefault

  • setVisibleByDefault(visibleByDefault: boolean): void
  • Sets if the hologram is visible by default. If not changed, this value is true by default so the hologram is visible to everyone.

    Parameters

    • visibleByDefault: boolean

      the new behaviour

    Returns void

showTo

  • showTo(player: BukkitPlayer): void
  • Shows the hologram to a player, overriding the value of {@link #isVisibleByDefault()}. This is persistent if the players goes offline.

    Parameters

    • player: BukkitPlayer

      the involved player

    Returns void

Generated using TypeDoc