Package com.earth2me.essentials.utils
Class LocationUtil
java.lang.Object
com.earth2me.essentials.utils.LocationUtil
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ItemStack
convertBlockToItem
(Block block) static Location
static Location
getSafeDestination
(IEssentials ess, IUser user, Location loc) static Location
getSafeDestination
(IEssentials ess, Location loc) static Location
getSafeDestination
(IUser user, Location loc) Deprecated.static Location
getTarget
(LivingEntity entity) static Location
getTarget
(LivingEntity entity, int maxDistance) static int
getXInsideWorldBorder
(World world, int x) static int
getZInsideWorldBorder
(World world, int z) static boolean
isBlockAboveAir
(IEssentials ess, World world, int x, int y, int z) static boolean
isBlockDamaging
(World world, int x, int y, int z) static boolean
isBlockOutsideWorldBorder
(World world, int x, int z) static boolean
isBlockUnsafe
(IEssentials ess, World world, int x, int y, int z) static boolean
isBlockUnsafeForUser
(IEssentials ess, IUser user, World world, int x, int y, int z) static void
setIsWaterSafe
(boolean isWaterSafe) static boolean
shouldFly
(IEssentials ess, Location loc)
-
Field Details
-
RADIUS
public static final int RADIUS- See Also:
-
VOLUME
-
-
Method Details
-
setIsWaterSafe
public static void setIsWaterSafe(boolean isWaterSafe) -
convertBlockToItem
-
getTarget
- Throws:
Exception
-
getTarget
- Throws:
Exception
-
isBlockAboveAir
-
isBlockOutsideWorldBorder
-
getXInsideWorldBorder
-
getZInsideWorldBorder
-
isBlockUnsafeForUser
public static boolean isBlockUnsafeForUser(IEssentials ess, IUser user, World world, int x, int y, int z) -
isBlockUnsafe
-
isBlockDamaging
-
getRoundedDestination
-
getSafeDestination
Deprecated.- Throws:
Exception
-
getSafeDestination
public static Location getSafeDestination(IEssentials ess, IUser user, Location loc) throws Exception - Throws:
Exception
-
getSafeDestination
- Throws:
Exception
-
shouldFly
-
getSafeDestination(IEssentials, IUser, Location)