Class MobsAtLoadedChunkLimiter

java.lang.Object
ua.mcchickenstudio.opencreative.indev.MobsAtLoadedChunkLimiter

public class MobsAtLoadedChunkLimiter extends Object
  • 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()