@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
if(player.isSneaking()) return false;
else {
if(!world.isRemote) {
TileEntitySecurityStation te = (TileEntitySecurityStation)world.getTileEntity(x, y, z);
if(te != null) {
if(te.isPlayerOnWhiteList(player)) {
player.openGui(PneumaticCraft.instance, CommonProxy.GUI_ID_SECURITY_STATION_INVENTORY, world, x, y, z);
} else if(!te.hasValidNetwork()) {
player.addChatComponentMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "This Security Station is out of order: Its network hasn't been properly configured."));
} else if(te.hasPlayerHacked(player)) {
player.addChatComponentMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "You've already hacked this Security Station!"));
} else if(getPlayerHackLevel(player) < te.getSecurityLevel()) {
player.addChatComponentMessage(new ChatComponentTranslation(EnumChatFormatting.RED + "You can't access or hack this Security Station. To hack it you need at least a Pneumatic Helmet upgraded with " + te.getSecurityLevel() + " Security upgrade(s)."));
} else {
player.openGui(PneumaticCraft.instance, CommonProxy.GUI_ID_HACKING, world, x, y, z);
}
}
}