Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.26 KB | None | 0 0
  1. if(!Properties.exists()){
  2.             try {
  3.                 Properties.createNewFile();
  4.                 FileWriter writer = null;
  5.                 try {
  6.                     writer = new FileWriter(Properties);
  7.                     writer.append("#mcMMO Main Configuration File\r\n");
  8.                     writer.append("#Turn this setting to false to disable pvp interactions completely (THIS IS FOR PLUGIN COMPATABILITY MAINLY)");
  9.                     writer.append("pvp=true");
  10.                     writer.append("#Excavation Loot Toggles");
  11.                     writer.append("eggs=true");
  12.                     writer.append("apples=true");
  13.                     writer.append("cake=true");
  14.                     writer.append("music=true");
  15.                     writer.append("diamond=true");
  16.                     writer.append("glowstone=true");
  17.                     writer.append("slowsand=true");
  18.                     writer.append("netherrack=true");
  19.                     writer.append("bones=true");
  20.                     writer.append("sulphur=true");
  21.                     writer.append("#Appreciate the plugin? Send me a donation via paypal nossr50@gmail.com\r\n");
  22.                 } catch (Exception e) {
  23.                     log.log(Level.SEVERE, "Exception while creating " + Properties, e);
  24.                 } finally {
  25.                     try {
  26.                         if (writer != null) {
  27.                             writer.close();
  28.                         }
  29.                     } catch (IOException e) {
  30.                         log.log(Level.SEVERE, "Exception while closing writer for " + Properties, e);
  31.                     }
  32.                 }
  33.  
  34.             } catch (IOException e) {
  35.                 e.printStackTrace();
  36.             }
  37.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement