public class LocationUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LocationUtils.Direction |
Constructor and Description |
---|
LocationUtils() |
Modifier and Type | Method and Description |
---|---|
static LocationUtils.Direction |
getDirection(Player p,
Location loc) |
static int |
getNbAirBlockDown(Player p)
Get the number of air below the specified player
|
static float |
getPlayerHeadHeight(Player p) |
static Vector |
getPlayerVec(Player p) |
static boolean |
hasBoatAroundHim(Location loc)
Check is there is a boat around the location (Distance of 3)
|
static boolean |
hasExtended(Location loc,
String m)
Deprecated.
|
static boolean |
hasLineOfSight(Player p,
Location loc) |
static boolean |
hasMaterialAround(Location loc,
Material... ms)
Deprecated.
|
static boolean |
hasMaterialsAround(Location loc,
String... ms)
Deprecated.
|
protected static boolean |
hasMovingPosition(World world,
Location position,
Vector vec3d,
Vector vec3d1) |
static boolean |
hasOtherThan(Location loc,
Material m)
Deprecated.
|
static boolean |
hasOtherThan(Location loc,
String name)
Deprecated.
|
static boolean |
hasOtherThanExtended(Location loc,
Material m)
Deprecated.
|
static boolean |
hasOtherThanExtended(Location loc,
String m)
Deprecated.
|
static boolean |
isBlockOfType(Location location,
String... materials) |
static boolean |
isInWater(Location loc) |
static boolean |
isUsingElevator(Player p) |
static void |
teleportPlayerOnGround(Player p) |
public static boolean isUsingElevator(Player p)
@Deprecated public static boolean hasMaterialAround(Location loc, Material... ms)
loc
- the location where you want to checkms
- Material that we are searching@Deprecated public static boolean hasMaterialsAround(Location loc, String... ms)
loc
- the location where you want to checkms
- Material's name that we are searchingWarn: For 'REDSTONE', we will also find 'REDSTONE_BLOCK' and all other block with contains name ...@Deprecated public static boolean hasOtherThanExtended(Location loc, Material m)
loc
- the location where you want to checkm
- The material that we are searching@Deprecated public static boolean hasOtherThanExtended(Location loc, String m)
loc
- the location where you want to checkm
- the name that we are searching in material names@Deprecated public static boolean hasExtended(Location loc, String m)
loc
- the location where you want to checkm
- the name that we are searching in material names@Deprecated public static boolean hasOtherThan(Location loc, Material m)
loc
- the location where you want to checkm
- The material that we are searching@Deprecated public static boolean hasOtherThan(Location loc, String name)
loc
- the location where you want to checkname
- the name that we are searching in material namespublic static boolean hasBoatAroundHim(Location loc)
loc
- The location to checkpublic static int getNbAirBlockDown(Player p)
p
- the player to know how many air blocks he has belowpublic static float getPlayerHeadHeight(Player p)
protected static boolean hasMovingPosition(World world, Location position, Vector vec3d, Vector vec3d1)
public static void teleportPlayerOnGround(Player p)
public static boolean isInWater(Location loc)
public static LocationUtils.Direction getDirection(Player p, Location loc)