Class MobsAtLoadedChunkLimiter
java.lang.Object
ua.mcchickenstudio.opencreative.indev.MobsAtLoadedChunkLimiter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisTooManyMobSpawns(@NotNull org.bukkit.entity.Entity entity, @NotNull org.bukkit.Location location) Checks if world has a lot of spawned mobs.voidonEventSpawn(org.bukkit.entity.Entity entity) void
-
Constructor Details
-
MobsAtLoadedChunkLimiter
public MobsAtLoadedChunkLimiter()
-
-
Method Details
-
onEventSpawn
public void onEventSpawn(org.bukkit.entity.Entity entity) -
isTooManyMobSpawns
public boolean isTooManyMobSpawns(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull org.bukkit.Location location) Checks if world has a lot of spawned mobs. Useful to prevent "too many spawns" lags.- Returns:
- true - if it's disallowed to spawn a mob right now, so it will be spawned after some time, false - it's allowed.
-
startMobSpawnerTask
public void startMobSpawnerTask()
-