Class MobRemovalTimerTask

java.lang.Object
com.palmergames.bukkit.towny.tasks.TownyTimerTask
com.palmergames.bukkit.towny.tasks.MobRemovalTimerTask
All Implemented Interfaces:
Runnable

public class MobRemovalTimerTask extends TownyTimerTask
  • Field Details

    • classesOfWorldMobsToRemove

      public static List<Class<?>> classesOfWorldMobsToRemove
    • classesOfWildernessMobsToRemove

      public static List<Class<?>> classesOfWildernessMobsToRemove
    • classesOfTownMobsToRemove

      public static List<Class<?>> classesOfTownMobsToRemove
  • Constructor Details

    • MobRemovalTimerTask

      public MobRemovalTimerTask(Towny plugin)
  • Method Details

    • isRemovingWorldEntity

      public static boolean isRemovingWorldEntity(org.bukkit.entity.LivingEntity livingEntity)
    • isRemovingWildernessEntity

      public static boolean isRemovingWildernessEntity(org.bukkit.entity.LivingEntity livingEntity)
    • isRemovingTownEntity

      public static boolean isRemovingTownEntity(org.bukkit.entity.LivingEntity livingEntity)
    • isSpawnReasonIgnored

      public static boolean isSpawnReasonIgnored(@NotNull @NotNull org.bukkit.entity.Entity entity)
    • isSpawnReasonIgnored

      public static boolean isSpawnReasonIgnored(@NotNull @NotNull org.bukkit.entity.Entity entity, @Nullable org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason)
    • run

      public void run()
    • isRemovingEntities

      public static boolean isRemovingEntities(@Nullable @Nullable TownyWorld world)
      Parameters:
      world - The world to check
      Returns:
      Whether entities have a chance of being removed in this world
    • checkEntity

      public static void checkEntity(@NotNull @NotNull Towny plugin, @NotNull @NotNull TownyWorld townyWorld, @NotNull @NotNull org.bukkit.entity.Entity ent)
      Checks and removes entities if necessary. Can be called from any thread.
      Parameters:
      plugin - Towny's plugin instance
      townyWorld - The world the entity is in
      ent - The entity to check