Advertisement
Krystal_Amaia

Untitled

Nov 17th, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. package com.badwater.bot.main;
  2.  
  3. import com.badwater.bot.core.*;
  4. import com.badwater.bot.helpers.JsonConfiguration.*;
  5. import com.google.gson.*;
  6. import org.pircbotx.exception.*;
  7.  
  8. import java.io.*;
  9. import java.sql.*;
  10.  
  11. /**
  12. * Created by Krystal on 8/3/14.
  13. */
  14. public class Main {
  15. //bot shit. stuff will be added here.
  16. private static BadwaterBot bot;
  17.  
  18. public static void main(String args[]) throws SQLException, IOException, IrcException, ClassNotFoundException {
  19. Gson gson = new Gson();
  20. JsonConfig jsonConfig = new JsonConfig();
  21. File file = new File("./DB/Configs/JsonConfig");
  22. if (!file.exists()) {
  23. System.out.print("Error: No File!");
  24. }
  25. else {
  26. System.out.println("File Is There, Bitchface.");
  27. }
  28. jsonConfig = gson.fromJson(new FileReader("./DB/Configs/JsonConfig"), JsonConfig.class);
  29.  
  30. System.out.print(jsonConfig.toString());
  31. System.out.print(jsonConfig.getName());
  32.  
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement