Class EntityUtils
java.lang.Object
io.github.sefiraat.slimetinker.utils.EntityUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.entity.EntitygetEntityLookedAtByEntity(org.bukkit.entity.LivingEntity lookingEntity) static <T extends org.bukkit.entity.Entity>
TgetEntityLookedAtByEntityByType(org.bukkit.entity.LivingEntity lookingEntity, Class<? extends org.bukkit.entity.Entity> entityType) static doublegetFacing(org.bukkit.entity.Player p, org.bukkit.entity.Entity e) static <T> List<T> getNearbyEntitiesByType(Class<?> clazz, org.bukkit.block.Block b, double x, double y, double z) static <T> List<T> getNearbyEntitiesByType(Class<?> clazz, org.bukkit.entity.Entity e, double x, double y, double z) static <T> List<T> getNearbyEntitiesByType(Class<?> clazz, org.bukkit.Location l, double x, double y, double z) static voidincreaseEffect(org.bukkit.potion.PotionEffectType potionEffectType, Map<org.bukkit.potion.PotionEffectType, Integer> potionEffects) Increases the requested potion effect by one, adding it if it doesn't existstatic voidincreaseEffect(org.bukkit.potion.PotionEffectType potionEffectType, Map<org.bukkit.potion.PotionEffectType, Integer> potionEffects, int amount) Increases the requested potion effect by the amount, adding it if it doesn't existstatic booleanisFacingAway(org.bukkit.entity.Player p, org.bukkit.entity.Entity e) static booleanisFacingAway(org.bukkit.entity.Player p, org.bukkit.entity.Entity e, Integer tolerance) static booleanisTrainingDummy(org.bukkit.entity.Entity e) SFW's Training dummy allows damage and exp gain for free, no thanks!static voidmakeBreed(org.bukkit.entity.Animals a) static voidpush(org.bukkit.entity.LivingEntity pushed, org.bukkit.Location loc, double force) static booleanshouldIgnoreDamage(org.bukkit.entity.Entity e) Checks for a PDC entry to ignore damage for player damage events fired unnaturally (Crysta's plates)
-
Method Details
-
push
public static void push(@Nonnull org.bukkit.entity.LivingEntity pushed, @Nonnull org.bukkit.Location loc, double force) -
increaseEffect
public static void increaseEffect(org.bukkit.potion.PotionEffectType potionEffectType, Map<org.bukkit.potion.PotionEffectType, Integer> potionEffects) Increases the requested potion effect by one, adding it if it doesn't exist- Parameters:
potionEffectType- The type of effectpotionEffects- The map of effects to update
-
increaseEffect
public static void increaseEffect(org.bukkit.potion.PotionEffectType potionEffectType, @Nonnull Map<org.bukkit.potion.PotionEffectType, Integer> potionEffects, int amount) Increases the requested potion effect by the amount, adding it if it doesn't exist- Parameters:
potionEffectType- The type of effectpotionEffects- The map of effects to updateamount- The amount to increment by
-
isTrainingDummy
public static boolean isTrainingDummy(@Nonnull org.bukkit.entity.Entity e) SFW's Training dummy allows damage and exp gain for free, no thanks!- Returns:
- True is target is a Training Dummy
-
shouldIgnoreDamage
public static boolean shouldIgnoreDamage(org.bukkit.entity.Entity e) Checks for a PDC entry to ignore damage for player damage events fired unnaturally (Crysta's plates)- Returns:
- True if damage SHOULD be ignored
-
getFacing
public static double getFacing(@Nonnull org.bukkit.entity.Player p, @Nonnull org.bukkit.entity.Entity e) -
isFacingAway
public static boolean isFacingAway(org.bukkit.entity.Player p, org.bukkit.entity.Entity e) -
isFacingAway
public static boolean isFacingAway(org.bukkit.entity.Player p, org.bukkit.entity.Entity e, @Nullable Integer tolerance) -
makeBreed
public static void makeBreed(@Nonnull org.bukkit.entity.Animals a) -
getNearbyEntitiesByType
-
getNearbyEntitiesByType
-
getNearbyEntitiesByType
-
getEntityLookedAtByEntity
@Nullable public static org.bukkit.entity.Entity getEntityLookedAtByEntity(org.bukkit.entity.LivingEntity lookingEntity) -
getEntityLookedAtByEntityByType
@Nullable public static <T extends org.bukkit.entity.Entity> T getEntityLookedAtByEntityByType(@Nonnull org.bukkit.entity.LivingEntity lookingEntity, Class<? extends org.bukkit.entity.Entity> entityType)
-