Class HeadManager
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.api.restartable.Restartable
nl.pim16aap2.animatedarchitecture.spigot.core.managers.HeadManager
- All Implemented Interfaces:
IRestartable
Represents a manager of player heads with the texture of a certain player.
-
Constructor Summary
ConstructorsConstructorDescriptionHeadManager(RestartableHolder holder, IExecutor executor, IConfigSpigot config) Constructs a newHeadManager. -
Method Summary
Modifier and TypeMethodDescriptionCompletableFuture<Optional<org.bukkit.inventory.ItemStack>> getPlayerHead(UUID playerUUID, String displayName) Requests the ItemStack of a head with the texture of the player's head.voidHandles the initialization.voidshutDown()Handles a shutdown.
-
Constructor Details
-
HeadManager
Constructs a newHeadManager.- Parameters:
holder- TheRestartableHolderthat manages this object.config- The AnimatedArchitecture configuration.
-
-
Method Details
-
getPlayerHead
public CompletableFuture<Optional<org.bukkit.inventory.ItemStack>> getPlayerHead(UUID playerUUID, String displayName) Requests the ItemStack of a head with the texture of the player's head. This is done asynchronously because it can take quite a bit of time.- Parameters:
playerUUID- TheUUIDof the player whose head to get.displayName- The display name to give assign to theItemStack.- Returns:
- The ItemStack of a head with the texture of the player's head if possible.
-
initialize
public void initialize()Description copied from interface:IRestartableHandles the initialization. -
shutDown
-