Interface HolographicHologramSkin
- All Superinterfaces:
HologramSkin
Represents a "holograph" (don't get confused by "holograms").
This one is a holographic hologram that's able to display text.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Displays specific lines that vary to each player. -
Method Summary
Modifier and TypeMethodDescriptiongetLines()
Returns the lines that are currently being displayed.Returns the current lines supplier.boolean
Returns whether a lines supplier has been set.void
Set the lines that shall be shownvoid
setLines
(Collection<String> lines) Set the lines that shall be shownvoid
setPlayerSpecificLinesSupplier
(@Nullable HolographicHologramSkin.PlayerSpecificLinesSupplier supplier) Set the (optional) supplier if you want to display lines specific to a player.void
Forcefully updates all lines provided by the lines-supplier (setPlayerSpecificLinesSupplier(PlayerSpecificLinesSupplier)
) for all playersboolean
updatePlayerSpecificLines
(Player player) Forcefully updates all lines provided by the lines-supplier (setPlayerSpecificLinesSupplier(PlayerSpecificLinesSupplier)
) only for a specific playerMethods inherited from interface de.marcely.bedwars.api.world.hologram.HologramSkin
getEntityId, getEntityType, getHologram, getNMSEntity, getType
-
Method Details
-
getLines
Collection<String> getLines()Returns the lines that are currently being displayed.- Returns:
- The lines currently shown
-
setLines
Set the lines that shall be shown- Parameters:
lines
- The new lines
-
setLines
Set the lines that shall be shown- Parameters:
lines
- The new lines
-
setPlayerSpecificLinesSupplier
void setPlayerSpecificLinesSupplier(@Nullable @Nullable HolographicHologramSkin.PlayerSpecificLinesSupplier supplier) Set the (optional) supplier if you want to display lines specific to a player.- Parameters:
supplier
- The new supplier.null
if you want to have static lines
-
hasPlayerSpecificLinesSupplier
boolean hasPlayerSpecificLinesSupplier()Returns whether a lines supplier has been set.- Returns:
true
if one is set
-
updatePlayerSpecificLines
void updatePlayerSpecificLines()Forcefully updates all lines provided by the lines-supplier (setPlayerSpecificLinesSupplier(PlayerSpecificLinesSupplier)
) for all players -
updatePlayerSpecificLines
Forcefully updates all lines provided by the lines-supplier (setPlayerSpecificLinesSupplier(PlayerSpecificLinesSupplier)
) only for a specific player- Parameters:
player
- The player who whom the params shall be updated- Returns:
false
if it failed (because he's either not seeing the hologram or there's no lines-supplier), otherwisetrue
-
getPlayerSpecificLinesSupplier
@Nullable @Nullable HolographicHologramSkin.PlayerSpecificLinesSupplier getPlayerSpecificLinesSupplier()Returns the current lines supplier.- Returns:
- The current lines supplier,
null
when there's none
-