Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. public void setupChatListener() {
  2. PluginDescriptionFile VarUtilType = this.getDescription();
  3. try {
  4. boolean license = false;
  5. URL url = new URL("http://bghddevelopment.epizy.com/admin/api.php?plugin=TEST&license=" + getConfig().getString("License"));
  6. BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
  7. String inputLine = in.readLine();
  8. while(inputLine!=null) {
  9. if(!(inputLine.contains("true")))
  10. continue;
  11. license = true;
  12. System.out.println("-----------------------------------");
  13. System.out.println(" ");
  14. System.out.println("StaffMode - Version " + VarUtilType.getVersion());
  15. System.out.println(" ");
  16. System.out.println("Successfully verified license key.");
  17. System.out.println("Your license key:");
  18. System.out.println(" ");
  19. System.out.println(getConfig().getString("License"));
  20. System.out.println(" ");
  21. System.out.println("-----------------------------------");
  22.  
  23. return;
  24. }
  25. in.close();
  26. if(!(license)) {
  27. System.out.println("Leaked version of StaffMode detected, shutting down server.");
  28. Bukkit.getPluginManager().disablePlugin(Main.instance);
  29. Main.instance.leaked = true;
  30. return;
  31. }
  32. } catch (Exception ex) {
  33. if(!Bukkit.getServer().getOnlineMode()) {
  34. System.out.print("Connection issue with auth servers. Caused by server being in offline mode.");
  35. } else {
  36. System.out.print("Connection issue with auth servers.");
  37. }
  38.  
  39. Bukkit.getPluginManager().disablePlugin(Main.instance);
  40. Main.instance.leaked = true;
  41. return;
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement