Class ArmorStandManager
java.lang.Object
studio.magemonkey.fabled.api.armorstand.ArmorStandManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcleanUp()Removes all armor stand instancesstatic voidclear(org.bukkit.entity.LivingEntity target) Clears armor stands for a given entitystatic Optional<ArmorStandInstance> getArmorStand(org.bukkit.entity.LivingEntity target, String key) Fetches an active armor stand for a given targetstatic ArmorStandDatagetArmorStandData(org.bukkit.entity.LivingEntity target) Gets the armor stand data for the given targetstatic voidinit()Registers the armor stand repeated task, and searches for rogue armor to remove themstatic voidregister(ArmorStandInstance armorStand, org.bukkit.entity.LivingEntity target, String key) Registers an active armor stand for the given targetstatic booleanremove(org.bukkit.entity.ArmorStand armorStand) Removes and unregisters an armor stand spawned by the armor stand mechanic, regardless of which target or key it was registered forstatic voidtick()Ticks all active armor stands
-
Constructor Details
-
ArmorStandManager
public ArmorStandManager()
-
-
Method Details
-
init
public static void init()Registers the armor stand repeated task, and searches for rogue armor to remove them -
cleanUp
public static void cleanUp()Removes all armor stand instances -
clear
public static void clear(org.bukkit.entity.LivingEntity target) Clears armor stands for a given entity- Parameters:
target- target to clear for
-
getArmorStandData
Gets the armor stand data for the given target- Parameters:
target- target to get the data for- Returns:
- armor stand data for the target or null if doesn't exist
-
getArmorStand
public static Optional<ArmorStandInstance> getArmorStand(org.bukkit.entity.LivingEntity target, String key) Fetches an active armor stand for a given target- Parameters:
target- target to get the armor stand forkey- armor stand key- Returns:
- active armor stand or null if not found
-
remove
public static boolean remove(org.bukkit.entity.ArmorStand armorStand) Removes and unregisters an armor stand spawned by the armor stand mechanic, regardless of which target or key it was registered for- Parameters:
armorStand- armor stand entity to remove- Returns:
- true if the armor stand was registered and has been removed, false otherwise
-
register
public static void register(ArmorStandInstance armorStand, org.bukkit.entity.LivingEntity target, String key) Registers an active armor stand for the given target- Parameters:
armorStand- armor stand to registertarget- target to register the armor stand forkey- armor stand key
-
tick
public static void tick()Ticks all active armor stands
-