public void save() {
		StringBuilder data = new StringBuilder();
		data.append("-" + nameText.getText() + "-" + System.getProperty("line.separator"));
		if(meleeButton.isSelected()) {
			data.append("<THRUST>" + System.getProperty("line.separator"));
			data.append(thrustPanel.save());
			data.append("<CRUSH>" + System.getProperty("line.separator"));
			data.append(crushPanel.save());
			data.append("<SLASH>" + System.getProperty("line.separator"));
			data.append(slashPanel.save());
			data.append("<PARRY>" + System.getProperty("line.separator"));
			data.append("0.55" + System.getProperty("line.separator"));
			data.append("<BREAK>" + System.getProperty("line.separator"));
			data.append("<DEFEND>" + System.getProperty("line.separator"));
			data.append("-1.0" + System.getProperty("line.separator"));
			data.append("<BREAK>" + System.getProperty("line.separator"));
			data.append("<END>" + System.getProperty("line.separator"));
		} else if(magicButton.isSelected()) {
			data.append("<SPELL1>" + System.getProperty("line.separator"));
			data.append("-1.0" + System.getProperty("line.separator"));
			data.append("<BREAK>" + System.getProperty("line.separator"));
			data.append("<SPELL2>" + System.getProperty("line.separator"));
			data.append("-1.0" + System.getProperty("line.separator"));
			data.append("<BREAK>" + System.getProperty("line.separator"));
			data.append("<SPELL3>" + System.getProperty("line.separator"));
			data.append("-1.0" + System.getProperty("line.separator"));
			data.append("<BREAK>" + System.getProperty("line.separator"));
			data.append("<ATTACK>" + System.getProperty("line.separator"));
			data.append(attackPanel.save());
			data.append("<DEFEND>" + System.getProperty("line.separator"));
			data.append("-1.0" + System.getProperty("line.separator"));
			data.append("<BREAK>" + System.getProperty("line.separator"));
			data.append("<END>" + System.getProperty("line.separator"));
		} else if(rangedButton.isSelected()) {
			data.append("<HEADSHOT>" + System.getProperty("line.separator"));
			data.append("-1.0" + System.getProperty("line.separator"));
			data.append("<BREAK>" + System.getProperty("line.separator"));
			data.append("<BODYSHOT>" + System.getProperty("line.separator"));
			data.append("-1.0" + System.getProperty("line.separator"));
			data.append("<BREAK>" + System.getProperty("line.separator"));
			data.append("<CRIPPLE>" + System.getProperty("line.separator"));
			data.append("-1.0" + System.getProperty("line.separator"));
			data.append("<BREAK>" + System.getProperty("line.separator"));
			data.append("<ATTACK>" + System.getProperty("line.separator"));
			data.append(attackPanel.save());
			data.append("<DEFEND>" + System.getProperty("line.separator"));
			data.append("-1.0" + System.getProperty("line.separator"));
			data.append("<BREAK>" + System.getProperty("line.separator"));
			data.append("<END>" + System.getProperty("line.separator"));
		} else {
			data.append("<THRUST>" + System.getProperty("line.separator"));
			data.append("0.45" + System.getProperty("line.separator"));
			data.append("<BREAK>" + System.getProperty("line.separator"));
			data.append("<END>" + System.getProperty("line.separator"));
		}
		
		BufferedReader reader;
		try {
			reader = new BufferedReader(new FileReader(System.getProperty("resources") + "/database/weapons"));

			String line;
			StringBuilder fileContent = new StringBuilder();
			boolean makeNew = true;
			while((line = reader.readLine()) != null) {
				if(line.matches("-" + nameText.getText() + "-")) {
					fileContent.append(data);
					makeNew = false;
					
					while(!(line = reader.readLine()).matches("<END>")) {
						
					}
				} else {
					fileContent.append(line);
					fileContent.append(System.getProperty("line.separator"));
				}
			}
			if(makeNew) {
				fileContent.append(System.getProperty("line.separator"));
				fileContent.append(data);
			}

			BufferedWriter out = new BufferedWriter(new FileWriter(System.getProperty("resources") + "/database/weapons"));
			out.write(fileContent.toString());
			out.close();
			reader.close();
		} catch (FileNotFoundException e) {
			System.out.println("The weapon database has been misplaced!");
			e.printStackTrace();
		} catch (IOException e) {
			System.out.println("Weapon database failed to load!");
			e.printStackTrace();
		}
	}