Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BukkitHologramManager

Hierarchy

  • BukkitHologramManager

Index

Constructors

constructor

Properties

API

API: any

Methods

createHologram

  • createHologram(__namedParameters: object): Hologram

getHolograms

  • Finds all the holograms created by the plugin.

    Returns Hologram[]

    the holograms created the plugin. the Collection is a copy and modifying it has no effect on the holograms.

getRegisteredPlaceholders

  • getRegisteredPlaceholders(): string[]
  • Finds all the placeholders registered by this plugin.

    Returns string[]

    a collection of placeholders registered by this plugin

isHologramEntity

  • isHologramEntity(bukkitEntity: any): boolean
  • Checks if an entity is part of a hologram.

    Parameters

    • bukkitEntity: any

      the entity to check

    Returns boolean

    true if the entity is a part of a hologram

registerPlaceholder

  • registerPlaceholder(textPlaceholder: string, refreshRate: number, replacer: object): void
  • Registers a new placeholder that can be used in holograms created with commands. With this method, you can basically expand the core of HolographicDisplays.

    Parameters

    • textPlaceholder: string

      the text that the placeholder will be associated to (e.g.: "{onlinePlayers}")

    • refreshRate: number

      the refresh rate of the placeholder, in seconds. Keep in mind that the minimum is 0.1 seconds, and that will be rounded to tenths of seconds

    • replacer: object

      the implementation that will return the text to replace the placeholder, where the update() method is called every refreshRate seconds

    Returns void

    true if the registration was successfull, false if it was already registered

unregisterPlaceholder

  • unregisterPlaceholder(textPlaceholder: string): boolean
  • Unregister a placeholder created by a plugin.

    Parameters

    • textPlaceholder: string

      the placeholder to remove

    Returns boolean

    true if found and removed, false otherwise

unregisterPlaceholders

  • unregisterPlaceholders(): void
  • Resets and removes all the placeholders registered by a plugin. This is useful when you have configurable placeholders and you want to remove all of them.

    Returns void

Generated using TypeDoc