Class SimpleBlockSafety
- java.lang.Object
- 
- com.onarandombox.MultiverseCore.utils.SimpleBlockSafety
 
- 
- All Implemented Interfaces:
- BlockSafety
 
 public class SimpleBlockSafety extends java.lang.Object implements BlockSafety The default-implementation ofBlockSafety.
- 
- 
Constructor SummaryConstructors Constructor Description SimpleBlockSafety(Core plugin)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanSpawnCartSafely(org.bukkit.entity.Minecart cart)Checks if the specifiedMinecartcan spawn safely.booleancanSpawnVehicleSafely(org.bukkit.entity.Vehicle vehicle)Checks if the specifiedVehiclecan spawn safely.org.bukkit.LocationgetBottomBlock(org.bukkit.Location l)Gets the location of the top block at the specifiedLocation.org.bukkit.LocationgetSafeBedSpawn(org.bukkit.Location l)Gets a safe bed spawn location OR null if the bed is invalid.org.bukkit.LocationgetTopBlock(org.bukkit.Location l)Gets the location of the top block at the specifiedLocation.booleanisBlockAboveAir(org.bukkit.Location l)This function checks whether the block at the given coordinates are above air or not.booleanisEntitiyOnTrack(org.bukkit.Location l)Checks if an entity would be on track at the specifiedLocation.static booleanisSolidBlock(org.bukkit.Material type)booleanplayerCanSpawnHereSafely(org.bukkit.Location l)This function checks whether the block at the coordinates given is safe or not by checking for Lava/Fire/Air etc.booleanplayerCanSpawnHereSafely(org.bukkit.World world, double x, double y, double z)Checks if a player can spawn safely at the given coordinates.
 
- 
- 
- 
Constructor Detail- 
SimpleBlockSafetypublic SimpleBlockSafety(Core plugin) 
 
- 
 - 
Method Detail- 
isBlockAboveAirpublic boolean isBlockAboveAir(org.bukkit.Location l) This function checks whether the block at the given coordinates are above air or not.- Specified by:
- isBlockAboveAirin interface- BlockSafety
- Parameters:
- l- The- Locationof the block.
- Returns:
- True if the block at that Locationis above air.
 
 - 
playerCanSpawnHereSafelypublic boolean playerCanSpawnHereSafely(org.bukkit.World world, double x, double y, double z)Checks if a player can spawn safely at the given coordinates.- Specified by:
- playerCanSpawnHereSafelyin interface- BlockSafety
- Parameters:
- world- The- World.
- x- The x-coordinate.
- y- The y-coordinate.
- z- The z-coordinate.
- Returns:
- True if a player can spawn safely at the given coordinates.
 
 - 
playerCanSpawnHereSafelypublic boolean playerCanSpawnHereSafely(org.bukkit.Location l) This function checks whether the block at the coordinates given is safe or not by checking for Lava/Fire/Air etc. This also ensures there is enough space for a player to spawn!- Specified by:
- playerCanSpawnHereSafelyin interface- BlockSafety
- Parameters:
- l- The- Location
- Returns:
- Whether the player can spawn safely at the given Location
 
 - 
getSafeBedSpawnpublic org.bukkit.Location getSafeBedSpawn(org.bukkit.Location l) Gets a safe bed spawn location OR null if the bed is invalid.- Specified by:
- getSafeBedSpawnin interface- BlockSafety
- Parameters:
- l- The location of the bead head (block with the pillow on it).
- Returns:
- Safe location around the bed or null if no location was found.
 
 - 
getTopBlockpublic org.bukkit.Location getTopBlock(org.bukkit.Location l) Gets the location of the top block at the specifiedLocation.- Specified by:
- getTopBlockin interface- BlockSafety
- Parameters:
- l- Any- Location.
- Returns:
- The Locationof the top-block.
 
 - 
getBottomBlockpublic org.bukkit.Location getBottomBlock(org.bukkit.Location l) Gets the location of the top block at the specifiedLocation.- Specified by:
- getBottomBlockin interface- BlockSafety
- Parameters:
- l- Any- Location.
- Returns:
- The Locationof the top-block.
 
 - 
isSolidBlockpublic static boolean isSolidBlock(org.bukkit.Material type) 
 - 
isEntitiyOnTrackpublic boolean isEntitiyOnTrack(org.bukkit.Location l) Checks if an entity would be on track at the specifiedLocation.- Specified by:
- isEntitiyOnTrackin interface- BlockSafety
- Parameters:
- l- The- Location.
- Returns:
- True if an entity would be on tracks at the specified Location.
 
 - 
canSpawnCartSafelypublic boolean canSpawnCartSafely(org.bukkit.entity.Minecart cart) Checks if the specifiedMinecartcan spawn safely.- Specified by:
- canSpawnCartSafelyin interface- BlockSafety
- Parameters:
- cart- The- Minecart.
- Returns:
- True if the minecart can spawn safely.
 
 - 
canSpawnVehicleSafelypublic boolean canSpawnVehicleSafely(org.bukkit.entity.Vehicle vehicle) Checks if the specifiedVehiclecan spawn safely.- Specified by:
- canSpawnVehicleSafelyin interface- BlockSafety
- Parameters:
- vehicle- The- Vehicle.
- Returns:
- True if the vehicle can spawn safely.
 
 
- 
 
-