Package valorless.rarespawns.task
Class NameplateCleanup
java.lang.Object
valorless.rarespawns.task.NameplateCleanup
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinit()Initializes scheduled tasks to clean up rogue and dead nameplates.
-
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.
- Removes rogue nameplates not tracked by EntityCreator or with invalid tags. (Every 200 ticks)
-