Class NameplateCleanup

java.lang.Object
valorless.rarespawns.task.NameplateCleanup

public class NameplateCleanup extends Object
Handles cleanup of rogue and dead nameplate entities in the world. Ensures that only valid RareEntity nameplates persist and removes any orphaned or invalid ones.
  • Constructor Details

    • NameplateCleanup

      public NameplateCleanup()
  • Method Details

    • init

      public static void init()
      Initializes scheduled tasks to clean up rogue and dead nameplates.
      • Removes rogue nameplates not tracked by EntityCreator or with invalid tags. (Every 200 ticks)
        - Meant to catch nameplates left behind by crashes or plugin reloads.
      • Removes dead nameplates from EntityCreator's list if their associated tasks are no longer running. (Every 20 ticks)
        - Meant to make sure nameplates are properly cleaned up, if their tasks stop for any reason, or their rare failed to remove them.