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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDisplays 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.booleanReturns whether a lines supplier has been set.voidSet the lines that shall be shownvoidsetLines(Collection<String> lines) Set the lines that shall be shownvoidsetPlayerSpecificLinesSupplier(@Nullable HolographicHologramSkin.PlayerSpecificLinesSupplier supplier) Set the (optional) supplier if you want to display lines specific to a player.voidForcefully updates all lines provided by the lines-supplier (setPlayerSpecificLinesSupplier(PlayerSpecificLinesSupplier)) for all playersbooleanupdatePlayerSpecificLines(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.nullif you want to have static lines
-
hasPlayerSpecificLinesSupplier
boolean hasPlayerSpecificLinesSupplier()Returns whether a lines supplier has been set.- Returns:
trueif 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:
falseif 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,
nullwhen there's none
-