Class ArmorStandManager

java.lang.Object
studio.magemonkey.fabled.api.armorstand.ArmorStandManager

public class ArmorStandManager extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Removes all armor stand instances
    static void
    clear(org.bukkit.entity.LivingEntity target)
    Clears armor stands for a given entity
    getArmorStand(org.bukkit.entity.LivingEntity target, String key)
    Fetches an active armor stand for a given target
    getArmorStandData(org.bukkit.entity.LivingEntity target)
    Gets the armor stand data for the given target
    static void
    Registers the armor stand repeated task, and searches for rogue armor to remove them
    static void
    register(ArmorStandInstance armorStand, org.bukkit.entity.LivingEntity target, String key)
    Registers an active armor stand for the given target
    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
    static void
    Ticks all active armor stands

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static ArmorStandData getArmorStandData(org.bukkit.entity.LivingEntity target)
      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 for
      key - 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 register
      target - target to register the armor stand for
      key - armor stand key
    • tick

      public static void tick()
      Ticks all active armor stands