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 TypeMethodDescriptionvoidapplyAnimation(TextHologram hologram, TextAnimation textAnimation) voidvoidcancelAnimation(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) booleanhologramExists(Hologram<?> hologram) booleanhologramExists(String id) voidifHologramExists(String id, Consumer<Hologram<?>> action) booleaninteractionBoxExists(int entityId) booleanbooleanmakePersistent(String id) Makes an existing hologram persistent so it will be saved and loaded on server restart.booleanregister(InteractionBox interactionBox) <H extends Hologram<H>>
booleanregister(H hologram) voidregisterEventHandler(HologramManager.Events eventHandler) booleanremove(LeaderboardHologram leaderboardHologram) booleanremove(LeaderboardHologram leaderboardHologram, boolean removePersistence) booleanremove(PagedLeaderboard pagedLeaderboard) Removes a PagedLeaderboard and all its components with persistence optionbooleanbooleanbooleanbooleanvoidvoidremoveAll(boolean removePersistence) voidvoidremoveEventHandler(HologramManager.Events eventHandler) booleanremoveInteractionBox(InteractionBox interactionBox) booleanbooleanRemoves persistence from a hologram so it will no longer be saved.voidspawn(LeaderboardHologram leaderboardHologram, org.bukkit.Location location) voidspawn(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) booleanupdateHologramIfExists(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
-