Package valorless.rarespawns.world
Class NaturalSpawnTask
java.lang.Object
org.bukkit.scheduler.BukkitRunnable
valorless.rarespawns.world.NaturalSpawnTask
- All Implemented Interfaces:
Runnable
public class NaturalSpawnTask
extends org.bukkit.scheduler.BukkitRunnable
Scheduled task that proactively spawns rare entities near players,
mimicking natural mob spawning without requiring a vanilla mob trigger.
This is the counterpart to SpawnEvent,
intended for biomes/locations where vanilla spawning is sparse or absent
(e.g. beaches, oceans, mushroom islands).
Runs every 400 ticks (~20 seconds) to match vanilla's spawn cycle cadence.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.bukkit.scheduler.BukkitRunnable
cancel, getTaskId, isCancelled, runTask, runTaskAsynchronously, runTaskLater, runTaskLaterAsynchronously, runTaskTimer, runTaskTimerAsynchronously
-
Constructor Details
-
NaturalSpawnTask
public NaturalSpawnTask()
-
-
Method Details
-
init
public static void init()Registers and starts this task. Should be called during plugin enable, after EntityCreator is initialised. -
run
public void run()
-