Class WbsEntities

java.lang.Object
wbs.utils.util.WbsEntities

@Deprecated public final class WbsEntities extends Object
Deprecated.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    blink(org.bukkit.entity.LivingEntity entity, double distance)
    Deprecated.
    Teleports the caster a given distance in the direction they're looking, ensuring a safe landing (cannot land in non-solid blocks)
    static boolean
    canSeeSky(org.bukkit.entity.LivingEntity entity)
    Deprecated.
     
    static void
    damage(org.bukkit.entity.LivingEntity target, double damage, org.bukkit.entity.LivingEntity attacker)
    Deprecated.
    Make the specified player deal damage to a living entity.
    static int
    getExp(org.bukkit.entity.Player player)
    Deprecated.
    Retrieved from https://github.com/EssentialsX/Essentials/blob/1e0d7fb0a3545d15c3b0cc1d180b47551f98cb22/Essentials/src/main/java/com/earth2me/essentials/craftbukkit/SetExpFix.java on 25-07-21
    static int
    getExpAtLevel(int level)
    Deprecated.
    Calculation for experience internally.
    static org.bukkit.util.Vector
    getFacingVector(org.bukkit.entity.LivingEntity entity)
    Deprecated.
    Gets a unit vector in the direction the caster is facing
    static org.bukkit.util.Vector
    getFacingVector(org.bukkit.entity.LivingEntity entity, double magnitude)
    Deprecated.
    Gets a vector in the direction the caster is facing scaled to the given magnitude
    static @Nullable org.bukkit.inventory.ItemStack
    getItemInSlot(org.bukkit.entity.LivingEntity entity, org.bukkit.inventory.EquipmentSlot slot)
    Deprecated.
     
    static org.bukkit.util.Vector
    getLocalUp(org.bukkit.entity.LivingEntity entity)
    Deprecated.
     
    static org.bukkit.Location
    getMiddleLocation(org.bukkit.entity.LivingEntity target)
    Deprecated.
    Get the location half way up a mob
    static <T extends org.bukkit.entity.LivingEntity>
    Set<T>
    getNearby(org.bukkit.entity.LivingEntity entity, double radius, boolean includeSelf, Class<T> clazz)
    Deprecated.
    Get all entities of a given LivingEntity subclass within a cuboid radius of a given location.
    static <T extends org.bukkit.entity.Entity>
    Set<T>
    getNearby(org.bukkit.Location loc, double range, Class<T> clazz)
    Deprecated.
     
    static <T extends org.bukkit.entity.Entity>
    Set<T>
    getNearby(org.bukkit.Location loc, double range, Set<T> exclude, Class<T> clazz)
    Deprecated.
     
    static <T extends org.bukkit.entity.Entity>
    Set<T>
    getNearby(org.bukkit.Location loc, double range, Set<T> exclude, Class<T> clazz, Predicate<T> predicate)
    Deprecated.
    Get all entities of a given LivingEntity subclass within a cuboid radius of a given location.
    static <T extends org.bukkit.entity.Entity>
    Set<T>
    getNearby(org.bukkit.Location loc, double range, T exclude, Class<T> clazz)
    Deprecated.
     
    static Set<org.bukkit.entity.LivingEntity>
    getNearbyLiving(org.bukkit.entity.LivingEntity entity, double range, boolean includeSelf)
    Deprecated.
     
    static Set<org.bukkit.entity.LivingEntity>
    getNearbyLiving(org.bukkit.Location loc, double range)
    Deprecated.
     
    static Set<org.bukkit.entity.LivingEntity>
    getNearbyLiving(org.bukkit.Location loc, double range, Set<org.bukkit.entity.LivingEntity> exclude)
    Deprecated.
     
    static Set<org.bukkit.entity.LivingEntity>
    getNearbyLiving(org.bukkit.Location loc, double range, org.bukkit.entity.LivingEntity exclude)
    Deprecated.
     
    static Set<org.bukkit.entity.LivingEntity>
    getNearbyLivingSpherical(org.bukkit.entity.LivingEntity entity, double radius, boolean includeSelf)
    Deprecated.
     
    static Set<org.bukkit.entity.LivingEntity>
    getNearbyLivingSpherical(org.bukkit.Location loc, double range)
    Deprecated.
     
    static Set<org.bukkit.entity.LivingEntity>
    getNearbyLivingSpherical(org.bukkit.Location loc, double range, Set<org.bukkit.entity.LivingEntity> exclude)
    Deprecated.
     
    static Set<org.bukkit.entity.LivingEntity>
    getNearbyLivingSpherical(org.bukkit.Location loc, double range, org.bukkit.entity.LivingEntity exclude)
    Deprecated.
     
    static <T extends org.bukkit.entity.LivingEntity>
    Set<T>
    getNearbySpherical(org.bukkit.entity.LivingEntity entity, double radius, boolean includeSelf, Class<T> clazz)
    Deprecated.
    Get all entities of a given LivingEntity subclass within a sphere of a given location.
    static <T extends org.bukkit.entity.Entity>
    Set<T>
    getNearbySpherical(org.bukkit.Location loc, double range, Class<T> clazz)
    Deprecated.
     
    static <T extends org.bukkit.entity.Entity>
    Set<T>
    getNearbySpherical(org.bukkit.Location loc, double radius, Set<T> exclude, Class<T> clazz)
    Deprecated.
    Get all entities of a given LivingEntity subclass within a spherical region of a given location.
    static <T extends org.bukkit.entity.Entity>
    Set<T>
    getNearbySpherical(org.bukkit.Location loc, double radius, Set<T> exclude, Class<T> clazz, Predicate<T> predicate)
    Deprecated.
    Get all entities of a given LivingEntity subclass within a spherical region of a given location.
    static <T extends org.bukkit.entity.Entity>
    Set<T>
    getNearbySpherical(org.bukkit.Location loc, double range, T exclude, Class<T> clazz)
    Deprecated.
     
    static org.bukkit.Location
    getNeckPosition(org.bukkit.entity.Player player)
    Deprecated.
    Returns the location at which the head pivots.
    static float
    getProgressForExp(int points)
    Deprecated.
     
    static org.bukkit.Location
    getTargetPos(org.bukkit.entity.LivingEntity entity, double range)
    Deprecated.
    Gets the location at the block the entity is looking at.
    static boolean
    heal(org.bukkit.entity.LivingEntity entity, double toHeal)
    Deprecated.
    Heal the target LivingEntity safely, taking into account max health
    static boolean
    isInMaterial(org.bukkit.entity.LivingEntity entity, org.bukkit.Material type)
    Deprecated.
     
    static boolean
    isInWater(org.bukkit.entity.LivingEntity entity)
    Deprecated.
     
    static void
    push(org.bukkit.entity.LivingEntity entity, double speed)
    Deprecated.
    Pushes the caster in the direction they're facing at a given speed
    static void
    push(org.bukkit.entity.LivingEntity entity, org.bukkit.util.Vector direction)
    Deprecated.
    Pushes the caster according to a vector
    static void
    setExp(org.bukkit.entity.Player player, int points)
    Deprecated.
    Set the total experience of a player safely and based on points
    static float
    toLevels(int points)
    Deprecated.
    Gets the amount of levels for the given amount of points, where the whole number part is the level, and the decimal is the progress to the next level.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • canSeeSky

      public static boolean canSeeSky(org.bukkit.entity.LivingEntity entity)
      Deprecated.
    • isInMaterial

      public static boolean isInMaterial(org.bukkit.entity.LivingEntity entity, org.bukkit.Material type)
      Deprecated.
    • isInWater

      public static boolean isInWater(org.bukkit.entity.LivingEntity entity)
      Deprecated.
    • getNearbyLivingSpherical

      public static Set<org.bukkit.entity.LivingEntity> getNearbyLivingSpherical(org.bukkit.Location loc, double range)
      Deprecated.
    • getNearbyLivingSpherical

      public static Set<org.bukkit.entity.LivingEntity> getNearbyLivingSpherical(org.bukkit.Location loc, double range, org.bukkit.entity.LivingEntity exclude)
      Deprecated.
    • getNearbyLivingSpherical

      public static Set<org.bukkit.entity.LivingEntity> getNearbyLivingSpherical(org.bukkit.Location loc, double range, Set<org.bukkit.entity.LivingEntity> exclude)
      Deprecated.
    • getNearbySpherical

      public static <T extends org.bukkit.entity.Entity> Set<T> getNearbySpherical(org.bukkit.Location loc, double range, Class<T> clazz)
      Deprecated.
    • getNearbySpherical

      public static <T extends org.bukkit.entity.Entity> Set<T> getNearbySpherical(org.bukkit.Location loc, double range, T exclude, Class<T> clazz)
      Deprecated.
    • setExp

      public static void setExp(org.bukkit.entity.Player player, int points)
      Deprecated.
      Set the total experience of a player safely and based on points
      Parameters:
      player - The player to set the exp for
      points - The new experience
    • toLevels

      public static float toLevels(int points)
      Deprecated.
      Gets the amount of levels for the given amount of points, where the whole number part is the level, and the decimal is the progress to the next level.
      Parameters:
      points - The points to find the level for
      Returns:
      The level
    • getProgressForExp

      public static float getProgressForExp(int points)
      Deprecated.
    • getExp

      public static int getExp(org.bukkit.entity.Player player)
      Deprecated.
      Retrieved from https://github.com/EssentialsX/Essentials/blob/1e0d7fb0a3545d15c3b0cc1d180b47551f98cb22/Essentials/src/main/java/com/earth2me/essentials/craftbukkit/SetExpFix.java on 25-07-21
      Returns:
      Gets the actual experience of the player
    • getExpAtLevel

      public static int getExpAtLevel(int level)
      Deprecated.
      Calculation for experience internally. Retrieved from https://github.com/EssentialsX/Essentials/blob/1e0d7fb0a3545d15c3b0cc1d180b47551f98cb22/Essentials/src/main/java/com/earth2me/essentials/craftbukkit/SetExpFix.java on 25-07-21
    • getNearbySpherical

      public static <T extends org.bukkit.entity.Entity> Set<T> getNearbySpherical(org.bukkit.Location loc, double radius, Set<T> exclude, Class<T> clazz)
      Deprecated.
      Get all entities of a given LivingEntity subclass within a spherical region of a given location.
      Type Parameters:
      T - The class of LivingEntity to be retrieved
      Parameters:
      loc - The center of the selection.
      radius - The radius around the location to check in.
      exclude - A set of entities to ignore
      clazz - The type of LivingEntity to be retrieved
      Returns:
      A Set of LivingEntities within the radius specified with range.
    • getNearbySpherical

      public static <T extends org.bukkit.entity.Entity> Set<T> getNearbySpherical(org.bukkit.Location loc, double radius, Set<T> exclude, Class<T> clazz, Predicate<T> predicate)
      Deprecated.
      Get all entities of a given LivingEntity subclass within a spherical region of a given location.
      Type Parameters:
      T - The class of LivingEntity to be retrieved
      Parameters:
      loc - The center of the selection.
      radius - The radius around the location to check in.
      exclude - A set of entities to ignore
      clazz - The type of LivingEntity to be retrieved
      predicate - A predicate to filter by before returning
      Returns:
      A Set of LivingEntities within the radius specified with range.
    • getNearbyLiving

      public static Set<org.bukkit.entity.LivingEntity> getNearbyLiving(org.bukkit.Location loc, double range)
      Deprecated.
    • getNearbyLiving

      public static Set<org.bukkit.entity.LivingEntity> getNearbyLiving(org.bukkit.Location loc, double range, org.bukkit.entity.LivingEntity exclude)
      Deprecated.
    • getNearbyLiving

      public static Set<org.bukkit.entity.LivingEntity> getNearbyLiving(org.bukkit.Location loc, double range, Set<org.bukkit.entity.LivingEntity> exclude)
      Deprecated.
    • getNearby

      public static <T extends org.bukkit.entity.Entity> Set<T> getNearby(org.bukkit.Location loc, double range, Class<T> clazz)
      Deprecated.
    • getNearby

      public static <T extends org.bukkit.entity.Entity> Set<T> getNearby(org.bukkit.Location loc, double range, T exclude, Class<T> clazz)
      Deprecated.
    • getNearby

      public static <T extends org.bukkit.entity.Entity> Set<T> getNearby(org.bukkit.Location loc, double range, Set<T> exclude, Class<T> clazz)
      Deprecated.
    • getNearby

      public static <T extends org.bukkit.entity.Entity> Set<T> getNearby(org.bukkit.Location loc, double range, Set<T> exclude, Class<T> clazz, Predicate<T> predicate)
      Deprecated.
      Get all entities of a given LivingEntity subclass within a cuboid radius of a given location. For a spherical region, use getNearbySpherical(Location, double, Entity, Class)
      Type Parameters:
      T - The class of LivingEntity to be retrieved
      Parameters:
      loc - The center of the selection.
      range - The max cuboid distance around the location to check in.
      exclude - A set of entities to ignore
      clazz - The type of LivingEntity to be retrieved
      Returns:
      A Set of LivingEntities within the radius specified with range.
    • getNearbyLiving

      public static Set<org.bukkit.entity.LivingEntity> getNearbyLiving(org.bukkit.entity.LivingEntity entity, double range, boolean includeSelf)
      Deprecated.
    • getNearby

      public static <T extends org.bukkit.entity.LivingEntity> Set<T> getNearby(org.bukkit.entity.LivingEntity entity, double radius, boolean includeSelf, Class<T> clazz)
      Deprecated.
      Get all entities of a given LivingEntity subclass within a cuboid radius of a given location. For a spherical region, use #getNearbySphere
      Parameters:
      entity - The entity at the center of the selection.
      radius - The cuboid radius around the location to check in.
      includeSelf - Whether or not to include entity in the resulting Set.
      clazz - The subclass of LivingEntity to check nearby entities for.
      Returns:
      A Set of LivingEntitys within the cuboid radius specified with range.
    • getNearbyLivingSpherical

      public static Set<org.bukkit.entity.LivingEntity> getNearbyLivingSpherical(org.bukkit.entity.LivingEntity entity, double radius, boolean includeSelf)
      Deprecated.
    • getNearbySpherical

      public static <T extends org.bukkit.entity.LivingEntity> Set<T> getNearbySpherical(org.bukkit.entity.LivingEntity entity, double radius, boolean includeSelf, Class<T> clazz)
      Deprecated.
      Get all entities of a given LivingEntity subclass within a sphere of a given location. For a cuboid region, use #getNearby
      Parameters:
      entity - The entity at the center of the selection.
      radius - The radius around the location to check in.
      includeSelf - Whether or not to include entity in the resulting Set.
      clazz - The subclass of LivingEntity to check nearby entities for.
      Returns:
      A Set of LivingEntitys within the radius specified with range.
    • getTargetPos

      public static org.bukkit.Location getTargetPos(org.bukkit.entity.LivingEntity entity, double range)
      Deprecated.
      Gets the location at the block the entity is looking at.
      Parameters:
      range - The maximum distance away from the entity the block may be
      Returns:
      The target location. null if there was no block in range
    • getNeckPosition

      public static org.bukkit.Location getNeckPosition(org.bukkit.entity.Player player)
      Deprecated.
      Returns the location at which the head pivots. Useful for getting relative coordinates to the head using facing vector.
      Parameters:
      player - The player whose neck pos to get
      Returns:
      The neck position
    • getFacingVector

      public static org.bukkit.util.Vector getFacingVector(org.bukkit.entity.LivingEntity entity)
      Deprecated.
      Gets a unit vector in the direction the caster is facing
      Returns:
      The facing vector
    • getFacingVector

      public static org.bukkit.util.Vector getFacingVector(org.bukkit.entity.LivingEntity entity, double magnitude)
      Deprecated.
      Gets a vector in the direction the caster is facing scaled to the given magnitude
      Parameters:
      magnitude - The scale of the resulting vector
      Returns:
      The facing vector
    • getLocalUp

      public static org.bukkit.util.Vector getLocalUp(org.bukkit.entity.LivingEntity entity)
      Deprecated.
    • push

      public static void push(org.bukkit.entity.LivingEntity entity, double speed)
      Deprecated.
      Pushes the caster in the direction they're facing at a given speed
      Parameters:
      speed - The new speed
    • push

      public static void push(org.bukkit.entity.LivingEntity entity, org.bukkit.util.Vector direction)
      Deprecated.
      Pushes the caster according to a vector
      Parameters:
      direction - The new velocity vector
    • blink

      public static boolean blink(org.bukkit.entity.LivingEntity entity, double distance)
      Deprecated.
      Teleports the caster a given distance in the direction they're looking, ensuring a safe landing (cannot land in non-solid blocks)
      Parameters:
      distance - The distance to teleport
      Returns:
      true if the blink was successful, false if there was no safe landing spot found
    • damage

      public static void damage(org.bukkit.entity.LivingEntity target, double damage, org.bukkit.entity.LivingEntity attacker)
      Deprecated.
      Make the specified player deal damage to a living entity.

      This method uses Damageable.damage(double, Entity), except it works on Ender Dragons because they're awful to work with.

      Parameters:
      target - The entity to damage
      damage - The amount of damage to deal
      attacker - The attacking entity to deal the damage. Nullable.
    • heal

      public static boolean heal(org.bukkit.entity.LivingEntity entity, double toHeal)
      Deprecated.
      Heal the target LivingEntity safely, taking into account max health
      Parameters:
      entity - The entity to heal
      toHeal - The amount to heal
      Returns:
      True if the entity was healed, false if already at max health
    • getMiddleLocation

      public static org.bukkit.Location getMiddleLocation(org.bukkit.entity.LivingEntity target)
      Deprecated.
      Get the location half way up a mob
      Parameters:
      target - The target mob
      Returns:
      The location half way up the given mob.
    • getItemInSlot

      @Nullable public static @Nullable org.bukkit.inventory.ItemStack getItemInSlot(org.bukkit.entity.LivingEntity entity, org.bukkit.inventory.EquipmentSlot slot)
      Deprecated.