Class HologramsService
java.lang.Object
io.github.thebusybiscuit.slimefun4.core.services.holograms.HologramsService
This service is responsible for handling holograms.
- Author:
- TheBusyBiscuit
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHologramsService
(org.bukkit.plugin.Plugin plugin) This constructs a newHologramsService
. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.util.Vector
This returns the defaultHologram
offset.boolean
removeHologram
(org.bukkit.Location loc) This removes theHologram
at that givenLocation
.void
setHologramLabel
(org.bukkit.Location loc, String label) This will update the label of theHologram
.void
start()
This will start theHologramsService
and schedule a repeating purge-task.
-
Constructor Details
-
HologramsService
public HologramsService(@Nonnull org.bukkit.plugin.Plugin plugin) This constructs a newHologramsService
.- Parameters:
plugin
- OurPlugin
instance
-
-
Method Details
-
start
public void start()This will start theHologramsService
and schedule a repeating purge-task. -
getDefaultOffset
@Nonnull public org.bukkit.util.Vector getDefaultOffset()This returns the defaultHologram
offset.- Returns:
- The default offset
-
removeHologram
public boolean removeHologram(@Nonnull org.bukkit.Location loc) This removes theHologram
at that givenLocation
.This method must be executed on the main
Server
Thread
.- Parameters:
loc
- TheLocation
- Returns:
- Whether the
Hologram
could be removed, false if theHologram
does not exist or was already removed
-
setHologramLabel
This will update the label of theHologram
.- Parameters:
loc
- TheLocation
of thisHologram
label
- The label to set, can be null
-