Class MobRemovalTimerTask
java.lang.Object
com.palmergames.bukkit.towny.tasks.TownyTimerTask
com.palmergames.bukkit.towny.tasks.MobRemovalTimerTask
- All Implemented Interfaces:
Runnable
-
Field Summary
Modifier and TypeFieldDescriptionFields inherited from class com.palmergames.bukkit.towny.tasks.TownyTimerTask
plugin, universe
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkEntity
(@NotNull Towny plugin, @NotNull TownyWorld townyWorld, @NotNull org.bukkit.entity.Entity ent) Checks and removes entities if necessary.static boolean
isRemovingEntities
(@Nullable TownyWorld world) static boolean
isRemovingTownEntity
(org.bukkit.entity.LivingEntity livingEntity) static boolean
isRemovingWildernessEntity
(org.bukkit.entity.LivingEntity livingEntity) static boolean
isRemovingWorldEntity
(org.bukkit.entity.LivingEntity livingEntity) static boolean
isSpawnReasonIgnored
(@NotNull org.bukkit.entity.Entity entity) static boolean
isSpawnReasonIgnored
(@NotNull org.bukkit.entity.Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) void
run()
-
Field Details
-
classesOfWorldMobsToRemove
-
classesOfWildernessMobsToRemove
-
classesOfTownMobsToRemove
-
-
Constructor Details
-
MobRemovalTimerTask
-
-
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
- 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 instancetownyWorld
- The world the entity is inent
- The entity to check
-