public boolean checkFrequency(Player player, double frequency) throws IOException{
		File myFile = new File("plugins/CakesMinerApocalypse/frequencies.txt");
		if (myFile.exists()){
			Scanner inputFile = new Scanner(myFile);
			String setFrequency = "";
			while (inputFile.hasNextLine()){
				String name = inputFile.nextLine();
				if (name.equals(player.getName())){
					setFrequency = inputFile.nextLine();
				}
				else
					inputFile.nextLine();
			}
			inputFile.close();
			if (setFrequency.equals("scan") && player.getInventory().contains(this.p.getPipboyID())){
				double random = Math.random() * 100;
				return random <= 1;
			}
			try {
		        Double.parseDouble(setFrequency);
		    } catch (NumberFormatException e) {
		        return false;
		    }
			return (Double.parseDouble(setFrequency) == frequency) && player.getInventory().contains(this.p.getPipboyID());
		}
		else
			return false;
	}