Interface Hologram
public interface Hologram
Group of one or more vertically aligned lines which appear as floating text lines and items. To create one see
HolographicDisplaysAPI.createHologram(Position).
The lines are displayed in a top to bottom order starting from the hologram position and going down.
- Since:
- 1
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Deletes this hologram, clearing the lines.@NotNull HologramLinesgetLines()Returns the editable lines of this hologram.@NotNull PlaceholderSettingReturns the placeholder setting.@NotNull PositionReturns the current position.@NotNull VisibilitySettingsReturns the visibility settings.booleanReturns if this hologram is deleted.voidsetPlaceholderSetting(@NotNull PlaceholderSetting placeholderSetting) Changes the placeholder setting.voidsetPosition(@NotNull String worldName, double x, double y, double z) Moves the hologram to the given position.voidsetPosition(@NotNull Position position) Moves the hologram to the given position.voidsetPosition(@NotNull org.bukkit.Location location) Moves the hologram to the given position.voidsetPosition(@NotNull org.bukkit.World world, double x, double y, double z) Moves the hologram to the given position.
-
Method Details
-
getLines
Returns the editable lines of this hologram.- Returns:
- the editable lines
- Since:
- 1
-
getVisibilitySettings
Returns the visibility settings.- Returns:
- the visibility settings
- Since:
- 1
-
getPosition
Returns the current position.- Returns:
- the current position
- Since:
- 1
-
setPosition
Moves the hologram to the given position.- Parameters:
position- the new position- Since:
- 1
-
setPosition
Moves the hologram to the given position.- Parameters:
worldName- the name of the world where the hologram should be movedx- the X coordinatey- the Y coordinatez- the Z coordinate- Since:
- 1
-
setPosition
void setPosition(@NotNull @NotNull org.bukkit.World world, double x, double y, double z) Moves the hologram to the given position.- Parameters:
world- the world where the hologram should be movedx- the X coordinatey- the Y coordinatez- the Z coordinate- Since:
- 1
-
setPosition
void setPosition(@NotNull @NotNull org.bukkit.Location location) Moves the hologram to the given position.- Parameters:
location- the new position- Since:
- 1
-
getPlaceholderSetting
Returns the placeholder setting.- Returns:
- the placeholder setting
- Since:
- 1
-
setPlaceholderSetting
Changes the placeholder setting.- Parameters:
placeholderSetting- the new placeholder setting- Since:
- 1
-
delete
void delete()Deletes this hologram, clearing the lines. Editing or teleporting the hologram after deleting it throws an exception. A deleted hologram should no longer be referenced.- Since:
- 1
-
isDeleted
boolean isDeleted()Returns if this hologram is deleted.- Returns:
- true if this hologram is deleted
- Since:
- 1
-