Interface HologramEntity

All Superinterfaces:
Metadatable, PersistentStorage.Holder

public interface HologramEntity extends Metadatable, PersistentStorage.Holder
The plugin has a special feature included called "Holohraphic Entities". Those are entities that aren't actually being spawned in the world, instead they're being send directly to the player via packets.

They're permanently being stored and due to the fact that they don't actually exist they can't be accessed via Bukkit's API. The extensibility of them is very limited, but you're able to do things that you'd otherwise not be able to do, such as having different NPC skins per player.

  • Method Details

    • getSkinType

      HologramSkinType getSkinType()
      Returns the skin type of the hologram.
      Returns:
      The skin type
    • getSkin

      HologramSkin getSkin()
      Returns the skin object of the hologram.
      Returns:
      The skin object
    • getMinVisibilityRadius

      int getMinVisibilityRadius()
      Returns the radius in which the hologram gets hidden for the player. People getting inside the given radius won't see the hologram anymore.

      This is for instance being used for the holograms above the bed that disappear in a specific range.

      Returns:
      The minimum visibility range
    • setMinVisibilityRadius

      void setMinVisibilityRadius(int distance)
      Make him only visible at a specific distance. People getting inside the given radius won't see the hologram anymore.

      This is for instance being used for the holograms above the bed that disappear in a specific range.

      Parameters:
      distance - The minimum visibility range
    • getLocation

      Location getLocation()
      Returns the current location of the hologram.
      Returns:
      It's location
      See Also:
    • getSpawnLocation

      Location getSpawnLocation()
      Returns the location at which the hologram was initially spawned.
      Returns:
      His never changing original spawn location
      See Also:
    • getSavingLocation

      Location getSavingLocation()
      Returns the location that will be saved and reused after the plugin restarts.

      Generally, the given location is equal to getLocation(). It may differ when passing false to

      Returns:
      The location that will be saved in a file
      See Also:
    • getWorld

      WorldStorage getWorld()
      Returns the world to which the hologram was added to
      Returns:
      The world of the hologram
    • teleport

      default void teleport(Location loc)
      Teleport him to another location.

      The new location is also permenantly being saved and reused after a restart.

      Parameters:
      loc - Its new location
    • teleport

      void teleport(Location loc, boolean save)
      Teleport him to another location.
      Parameters:
      loc - Its new location
      save - true to save it permanently. false if it shall automatically revert to getSavingLocation() after a restart
    • getDisplayName

      String getDisplayName()
      Returns the name that will be displayed above his head.
      Returns:
      His display name. null when none has been set
    • hasDisplayName

      boolean hasDisplayName()
      Returns whether or not a custom display name is given.
      Returns:
      If a display name has been set or not
    • setDisplayName

      void setDisplayName(String name)
      Set the name that will be displayed above his head.
      Parameters:
      name - His new display name
    • getSeeingPlayers

      Player[] getSeeingPlayers()
      Returns all the player who are theoretically able to see him. The player does not have to directly look at him, all the hologram has to be is to be inside the servers/clients view distance and got send.
      Returns:
      All players who are nearby this hologram
    • getSeeingPlayersAmount

      int getSeeingPlayersAmount()
      Returns the amount of getSeeingPlayersAmount()
      Returns:
      The amount of players who are theoretically seeing this hologram
    • isPersistent

      boolean isPersistent()
      Returns whether or not it'll stay even after a reload.

      Gets stored locally if set to true.

      Returns:
      If the hologram is persistent or not
    • setPersistent

      void setPersistent(boolean persistent)
      Returns whether or not it'll disappear after a reload.

      Gets stored locally if set to true.

      Parameters:
      persistent - If the hologram is persistent or not
    • setControllerType

      void setControllerType(HologramControllerType controller)
      Set the controller (aka the brain) of the hologram.

      It'll automatically and always initiate a new HologramController instance that can be accessed using getController().

      Parameters:
      controller - The new type of the controller
    • getControllerType

      HologramControllerType getControllerType()
      Returns the current type of the controller (aka the brain) of the given hologram.
      Returns:
      The type of the current set controller
    • getController

      HologramController getController()
      Returns the instance of the controller (aka the brain) of the hologram.

      There's no global instance per type. Each hologram as his own instance that may be deconstructed and reconstructed at any time using setControllerType(HologramControllerType).

      Returns:
      The current instance of the controller
    • exists

      boolean exists()
      Returns if the hologram still exists and hasn't been removed yet.
      Returns:
      If it exists
    • remove

      void remove()
      Completely removes the hologram.