Package com.maximde.hologramlib.hologram
Class HologramManager
java.lang.Object
com.maximde.hologramlib.hologram.HologramManager
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyAnimation
(TextHologram hologram, TextAnimation textAnimation) void
void
cancelAnimation
(TextHologram hologram) copyHologram
(H source) copyHologram
(H source, boolean persistent) copyHologram
(H source, String id) copyHologram
(H source, String id, boolean persistent) getHologram
(String id) Deprecated.getHologramByEntityId
(int entityId) Deprecated.getInteractionBoxByEntityId
(int entityId) boolean
hologramExists
(Hologram<?> hologram) boolean
hologramExists
(String id) void
ifHologramExists
(String id, Consumer<Hologram<?>> action) boolean
interactionBoxExists
(int entityId) boolean
boolean
makePersistent
(String id) Makes an existing hologram persistent so it will be saved and loaded on server restart.boolean
register
(InteractionBox interactionBox) <H extends Hologram<H>>
booleanregister
(H hologram) void
registerEventHandler
(HologramManager.Events eventHandler) boolean
remove
(LeaderboardHologram leaderboardHologram) boolean
remove
(LeaderboardHologram leaderboardHologram, boolean removePersistence) boolean
remove
(PagedLeaderboard pagedLeaderboard) Removes a PagedLeaderboard and all its components with persistence optionboolean
boolean
boolean
boolean
void
void
removeAll
(boolean removePersistence) void
void
removeEventHandler
(HologramManager.Events eventHandler) boolean
removeInteractionBox
(InteractionBox interactionBox) boolean
boolean
Removes persistence from a hologram so it will no longer be saved.void
spawn
(LeaderboardHologram leaderboardHologram, org.bukkit.Location location) void
spawn
(LeaderboardHologram leaderboardHologram, org.bukkit.Location location, boolean persistant, boolean ignorePitchYaw) spawn
(PagedLeaderboard pagedLeaderboard, org.bukkit.Location location) Spawns a PagedLeaderboard at the specified location with persistence optionspawn
(InteractionBox interactionBox, org.bukkit.Location location) spawn
(InteractionBox interactionBox, org.bukkit.Location location, boolean ignorePitchYaw) <H extends Hologram<H>>
Hspawn
(H hologram, org.bukkit.Location location) <H extends Hologram<H>>
Hspawn
(H hologram, org.bukkit.Location location, boolean persistent, boolean ignorePitchYaw) boolean
updateHologramIfExists
(String id, Consumer<Hologram<?>> updateAction)
-
Constructor Details
-
HologramManager
public HologramManager()
-
-
Method Details
-
registerEventHandler
-
removeEventHandler
-
interactionBoxExists
-
interactionBoxExists
public boolean interactionBoxExists(int entityId) -
getInteractionBox
-
getInteractionBoxByEntityId
-
getInteractionBoxes
-
getInteractionBoxIds
-
spawn
-
spawn
public InteractionBox spawn(InteractionBox interactionBox, org.bukkit.Location location, boolean ignorePitchYaw) -
register
-
removeInteractionBox
-
removeInteractionBox
-
removeAllInteractionBoxes
public void removeAllInteractionBoxes() -
spawn
Spawns a PagedLeaderboard at the specified location with persistence option -
remove
Removes a PagedLeaderboard and all its components with persistence option -
getHologramsMap
Deprecated. -
getHologramAnimations
Deprecated. -
hologramExists
-
hologramExists
-
getHolograms
-
getHologramIds
-
getHologram
-
getHologramByEntityId
-
spawn
-
spawn
public void spawn(LeaderboardHologram leaderboardHologram, org.bukkit.Location location, boolean persistant, boolean ignorePitchYaw) -
spawn
-
spawn
public <H extends Hologram<H>> H spawn(H hologram, org.bukkit.Location location, boolean persistent, boolean ignorePitchYaw) -
attach
-
register
-
remove
-
remove
-
remove
-
remove
-
removeAll
public void removeAll(boolean removePersistence) -
removeAll
public void removeAll() -
remove
-
remove
-
applyAnimation
-
cancelAnimation
-
ifHologramExists
-
updateHologramIfExists
-
copyHologram
-
copyHologram
-
copyHologram
-
copyHologram
-
makePersistent
Makes an existing hologram persistent so it will be saved and loaded on server restart.- Parameters:
id
- The ID of the hologram to make persistent- Returns:
- true if the hologram was found and made persistent, false otherwise
-
removePersistence
Removes persistence from a hologram so it will no longer be saved. The hologram will remain active until the server restarts.- Parameters:
id
- The ID of the hologram to remove persistence from- Returns:
- true if the hologram was found and persistence was removed, false otherwise
-