Class EntityUtils

java.lang.Object
io.github.sefiraat.slimetinker.utils.EntityUtils

public final class EntityUtils extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.entity.Entity
    getEntityLookedAtByEntity(org.bukkit.entity.LivingEntity lookingEntity)
     
    static <T extends org.bukkit.entity.Entity>
    T
    getEntityLookedAtByEntityByType(org.bukkit.entity.LivingEntity lookingEntity, Class<? extends org.bukkit.entity.Entity> entityType)
     
    static double
    getFacing(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 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
    static void
    increaseEffect(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 exist
    static boolean
    isFacingAway(org.bukkit.entity.Player p, org.bukkit.entity.Entity e)
     
    static boolean
    isFacingAway(org.bukkit.entity.Player p, org.bukkit.entity.Entity e, Integer tolerance)
     
    static boolean
    isTrainingDummy(org.bukkit.entity.Entity e)
    SFW's Training dummy allows damage and exp gain for free, no thanks!
    static void
    makeBreed(org.bukkit.entity.Animals a)
     
    static void
    push(org.bukkit.entity.LivingEntity pushed, org.bukkit.Location loc, double force)
     
    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)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 effect
      potionEffects - 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 effect
      potionEffects - The map of effects to update
      amount - 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

      @Nonnull public static <T> List<T> getNearbyEntitiesByType(@Nonnull Class<?> clazz, @Nonnull org.bukkit.entity.Entity e, double x, double y, double z)
    • getNearbyEntitiesByType

      @Nonnull public static <T> List<T> getNearbyEntitiesByType(@Nonnull Class<?> clazz, @Nonnull org.bukkit.block.Block b, double x, double y, double z)
    • getNearbyEntitiesByType

      @Nonnull public static <T> List<T> getNearbyEntitiesByType(@Nonnull Class<?> clazz, @Nonnull org.bukkit.Location l, double x, double y, double z)
    • 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)