public void loadTraps(){
		String tmp = "";
		String location[];
		boolean traps[];
		Coordinate coord;
		TrapChest tempChest;
		char tempType[];
		World w;
		
		System.out.println("[" + pluginname + "] Loading traps...");
		
		try{
			String path = "plugins/ChestTrap";
			chests = new File(path + "/chests.dat");
			
			if(!chests.exists()){
				(new File(path)).mkdir();
				chests.createNewFile();
			}
			
			FileInputStream chestIn = new FileInputStream(chests);
			BufferedReader reader = new BufferedReader(new InputStreamReader(new DataInputStream(chestIn)));
			
			while((tmp = reader.readLine()) != null){
				numberOfChests++;
				file_contents += tmp;
				String temp[] = tmp.split(":");
				
				if(temp.length != 2){
					System.out.println("[" + pluginname + "] An error occured: invalid line at line: " + numberOfChests + ". No trap data.");
				} else {
					//location of traps
					location = temp[0].split(",");
					if(location.length != 4){
						System.out.println("[" + pluginname + "] An error occured: invalid line at line: " + numberOfChests + ". Not enough data.");
					} else {
						if((w = plugin.getServer().getWorld(location[0])) == null){
							System.out.println("[" + pluginname + "] An error occured: invalid world at line: " + numberOfChests);
						} else {
							boolean validIntegers = false;
							int[] locations = new int[3];
							
							try{
								locations[0] = Integer.parseInt(location[1]);
								locations[1] = Integer.parseInt(location[2]);
								locations[2] = Integer.parseInt(location[3]);
								
								validIntegers = true;
							} catch(NumberFormatException e){
								e.printStackTrace();
							}
							if(!validIntegers){
								System.out.println("[" + pluginname + "] An error occured: invalid integer at line: " + numberOfChests);
							} else {
								if(w.getBlockTypeIdAt(locations[0], locations[1], locations[2]) != 54){
									System.out.println("[" + pluginname + "] An error occured: invalid block specified at line: " + numberOfChests);
								} else {
									//trap types
									tempType = temp[1].toCharArray();
									traps = validateData(tempType, 4);
									
									coord = new Coordinate(w, locations[0], locations[1], locations[2]);
									tempChest = new TrapChest(coord, traps, plugin);
									
									chest_list.put(tempChest.getBlock(), tempChest);
								}
							}
						}
					}
				}
			}
			
		} catch(Exception e){
			e.printStackTrace();
		}
		
		System.out.println("[" + pluginname + "] " + numberOfChests + " traps loaded.");
	}