rendered paste bodyTähän tyyliinFile file = new File( getDataFolder() + "/DropPlugin.properties" ); if( !file.exists() ) { new File( getDataFolder().toString() ).mkdir(); Properties pr = new Properties(); try { FileInputStream in = new FileInputStream(file); pr.load(in); dropglass = Boolean.parseBoolean(pr.getProperty("drop-glass")); } catch (IOException e) { log.warning (LOG_PREFIX + "Exception: " + e.getMessage()); log.warning (LOG_PREFIX + "Could not create a configuration file!"); } } else { File dir = new File(getDataFolder().toString()); if (!dir.exists()) { dir.mkdir(); } try { file.createNewFile(); try { PrintWriter out = new PrintWriter(new FileWriter(getDataFolder()+"/DropPlugin.properties")); out.println("drop-glass=true"); out.close(); } catch (IOException e) { e.printStackTrace(); } } catch(IOException ioe) { } } }