mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-29 03:48:50 +01:00
Add convenience method for isPassable.
This commit is contained in:
parent
6c610c490b
commit
77d8c27f7e
@ -977,6 +977,17 @@ public class BlockProperties {
|
||||
final IBlockAccess access = ((org.bukkit.craftbukkit.CraftWorld) loc.getWorld()).getHandle();
|
||||
return isPassable(access, loc.getX(), loc.getY(), loc.getZ(), access.getTypeId(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method to allow using an already fetched or prepared IBlockAccess.
|
||||
* @param access
|
||||
* @param loc
|
||||
* @return
|
||||
*/
|
||||
public static final boolean isPassable(final IBlockAccess access, final Location loc)
|
||||
{
|
||||
return isPassable(access, loc.getX(), loc.getY(), loc.getZ(), access.getTypeId(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
|
||||
}
|
||||
|
||||
/**
|
||||
* API access to read extra properties from files.
|
||||
|
Loading…
Reference in New Issue
Block a user