Class ArmorStandManager
java.lang.Object
studio.magemonkey.fabled.api.armorstand.ArmorStandManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
cleanUp()
Removes all armor stand instancesstatic void
clear
(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 ArmorStandData
getArmorStandData
(org.bukkit.entity.LivingEntity target) Gets the armor stand data for the given targetstatic void
init()
Registers the armor stand repeated task, and searches for rogue armor to remove themstatic void
register
(ArmorStandInstance armorStand, org.bukkit.entity.LivingEntity target, String key) Registers an active armor stand for the given targetstatic void
tick()
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
-
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
-