Package com.Moshu.Misc
Class Locations
java.lang.Object
com.Moshu.Misc.Locations
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic booleanblacklistedBiome(org.bukkit.Location loc) Checks if the biome at the location is a blacklisted biomestatic booleancheck(org.bukkit.Location loc, int maxTreasureDistance) static doubledistanceTo(org.bukkit.Location loc1, org.bukkit.Location loc2) static doublegetBorder(org.bukkit.World w) static org.bukkit.LocationgetRandomLocationMoreThan(org.bukkit.World w, int maxTreasureDistance, double distance, double min) Get a safe, random locationstatic booleaninAir(org.bukkit.Location loc) Checks if the location under the location is airstatic voidinit()static booleanisAir(org.bukkit.Location l) Checks if the block at the location is airstatic booleanisAllowedWorld(org.bukkit.World w) static booleanisInBorder(org.bukkit.Location l, int maxTreasureDistance) static booleanisInRegion(org.bukkit.Chunk c, int y) Checks if the chunk is in a region at allstatic booleanisInRegion(org.bukkit.Location loc) Checks if the location is in a region at allstatic booleanisInRegion(org.bukkit.Location loc, String regionName) Checks if current location is in a WorldGuard regionstatic booleanisLeaves(org.bukkit.Location loc) Checks if the block at the location is a type of leafstatic booleanisLiquid(org.bukkit.Location loc) Checks if location is a liqudstatic booleanisLiquidAbove(org.bukkit.Location loc) Checks if the location above the location is a liqudstatic booleanisLiquidUnder(org.bukkit.Location loc) Checks if location under the location is a liqudstatic booleanisPassableBlockUnder(org.bukkit.Location loc) static booleanisSafeEnough(org.bukkit.Location loc) static booleanisUnsafe(org.bukkit.Location loc, int maxTreasureDistance) Checks if a location is considered unsafe based on check()static voidload(org.bukkit.Location l) Loads a chunk 
- 
Constructor Details
- 
Locations
public Locations() 
 - 
 - 
Method Details
- 
init
public static void init() - 
isAllowedWorld
public static boolean isAllowedWorld(org.bukkit.World w)  - 
isInRegion
Checks if current location is in a WorldGuard region- Parameters:
 loc- the locationregionName- the regions name- Returns:
 - true/false
 
 - 
isInRegion
public static boolean isInRegion(org.bukkit.Location loc) Checks if the location is in a region at all- Parameters:
 loc- the location- Returns:
 - true/false
 
 - 
isInRegion
public static boolean isInRegion(org.bukkit.Chunk c, int y) Checks if the chunk is in a region at all- Parameters:
 c- the chunk- Returns:
 - true/false
 
 - 
isLiquid
public static boolean isLiquid(org.bukkit.Location loc) Checks if location is a liqud- Parameters:
 loc- the location- Returns:
 - true/false
 
 - 
isLiquidAbove
public static boolean isLiquidAbove(org.bukkit.Location loc) Checks if the location above the location is a liqud- Parameters:
 loc- the location- Returns:
 - true/false
 
 - 
isLiquidUnder
public static boolean isLiquidUnder(org.bukkit.Location loc) Checks if location under the location is a liqud- Parameters:
 loc- the location- Returns:
 - true/false
 
 - 
isUnsafe
public static boolean isUnsafe(org.bukkit.Location loc, int maxTreasureDistance) Checks if a location is considered unsafe based on check()- Parameters:
 loc- the location- Returns:
 - true/false
 
 - 
isSafeEnough
public static boolean isSafeEnough(org.bukkit.Location loc)  - 
check
public static boolean check(org.bukkit.Location loc, int maxTreasureDistance) - Parameters:
 loc- , the location- Returns:
 - true if the location is safe and false if the location is not suitable for a player
 
 - 
isPassableBlockUnder
public static boolean isPassableBlockUnder(org.bukkit.Location loc)  - 
inAir
public static boolean inAir(org.bukkit.Location loc) Checks if the location under the location is air- Parameters:
 loc- the location- Returns:
 - true/false
 
 - 
load
public static void load(org.bukkit.Location l) Loads a chunk- Parameters:
 l- the location
 - 
blacklistedBiome
public static boolean blacklistedBiome(org.bukkit.Location loc) Checks if the biome at the location is a blacklisted biome- Parameters:
 loc- the location- Returns:
 - true/false
 
 - 
isLeaves
public static boolean isLeaves(org.bukkit.Location loc) Checks if the block at the location is a type of leaf- Parameters:
 loc- the location- Returns:
 - true/false
 
 - 
isAir
public static boolean isAir(org.bukkit.Location l) Checks if the block at the location is air- Parameters:
 l- the location- Returns:
 - true/false
 
 - 
isInBorder
public static boolean isInBorder(org.bukkit.Location l, int maxTreasureDistance)  - 
distanceTo
public static double distanceTo(org.bukkit.Location loc1, org.bukkit.Location loc2)  - 
getBorder
public static double getBorder(org.bukkit.World w)  - 
getRandomLocationMoreThan
public static org.bukkit.Location getRandomLocationMoreThan(org.bukkit.World w, int maxTreasureDistance, double distance, double min) Get a safe, random location- Parameters:
 w- the world of the treasuredistance- the distance from the center of the world- Returns:
 - the safe location
 
 
 -