Class ChunkParticlesSpawner
java.lang.Object
tfagaming.projects.minecraft.homestead.borders.ChunkParticlesSpawner
Handles particle spawning around claimed region chunks for a specific player.
-
Constructor Summary
ConstructorsConstructorDescriptionChunkParticlesSpawner(org.bukkit.entity.Player player) Creates a newChunkParticlesSpawnerfor the given player. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcancelTask(org.bukkit.entity.Player player) Cancels the active particle task for the given player, if any.static voidcancelTask(TaskHandle task, org.bukkit.entity.Player player) Cancels the given task and removes it from the tracking map.static booleanisTaskRunning(org.bukkit.entity.Player player) Returnstrueif a particle task is currently running for the given player, otherwisefalse.voidRe-fetches all regions fromRegionManagerand spawns border particles for each one.voidspawnParticlesForRegion(Region region) Spawns border particles around the chunk boundaries of the given region.voidStarts the repeating task that drives particle spawning.
-
Constructor Details
-
ChunkParticlesSpawner
public ChunkParticlesSpawner(org.bukkit.entity.Player player) Creates a newChunkParticlesSpawnerfor the given player.- Parameters:
player- The player to show region borders for
-
-
Method Details
-
cancelTask
Cancels the given task and removes it from the tracking map.- Parameters:
task- The task handle to cancelplayer- The player associated with the task
-
cancelTask
public static void cancelTask(org.bukkit.entity.Player player) Cancels the active particle task for the given player, if any.- Parameters:
player- The player whose task should be cancelled
-
isTaskRunning
public static boolean isTaskRunning(org.bukkit.entity.Player player) Returnstrueif a particle task is currently running for the given player, otherwisefalse.- Parameters:
player- The player to check
-
spawnParticles
public void spawnParticles()Re-fetches all regions fromRegionManagerand spawns border particles for each one. -
spawnParticlesForRegion
Spawns border particles around the chunk boundaries of the given region.- Parameters:
region- The region whose chunk borders should be visualised
-
startRepeatingEffect
public void startRepeatingEffect()Starts the repeating task that drives particle spawning.
-