Class MobRemovalTimerTask
java.lang.Object
com.palmergames.bukkit.towny.tasks.TownyTimerTask
com.palmergames.bukkit.towny.tasks.MobRemovalTimerTask
- All Implemented Interfaces:
Runnable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Set<org.bukkit.entity.EntityType> static Set<org.bukkit.entity.EntityType> static Set<org.bukkit.entity.EntityType> Fields inherited from class com.palmergames.bukkit.towny.tasks.TownyTimerTask
plugin, universe -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckEntity(@NotNull Towny plugin, @NotNull TownyWorld townyWorld, @NotNull org.bukkit.entity.Entity ent) Checks and removes entities if necessary.static booleanisRemovingEntities(@Nullable TownyWorld world) static booleanisRemovingTownEntity(org.bukkit.entity.LivingEntity livingEntity) static booleanisRemovingWildernessEntity(org.bukkit.entity.LivingEntity livingEntity) static booleanisRemovingWorldEntity(org.bukkit.entity.LivingEntity livingEntity) static booleanisSpawnReasonIgnored(@NotNull org.bukkit.entity.Entity entity) static booleanisSpawnReasonIgnored(@NotNull org.bukkit.entity.Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) voidrun()
-
Field Details
-
typesOfWorldMobsToRemove
-
typesOfWildernessMobsToRemove
-
typesOfTownMobsToRemove
-
-
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
-