Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void setupChatListener() {
- PluginDescriptionFile VarUtilType = this.getDescription();
- try {
- boolean license = false;
- URL url = new URL("http://bghddevelopment.epizy.com/admin/api.php?plugin=TEST&license=" + getConfig().getString("License"));
- BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
- String inputLine = in.readLine();
- while(inputLine!=null) {
- if(!(inputLine.contains("true")))
- continue;
- license = true;
- System.out.println("-----------------------------------");
- System.out.println(" ");
- System.out.println("StaffMode - Version " + VarUtilType.getVersion());
- System.out.println(" ");
- System.out.println("Successfully verified license key.");
- System.out.println("Your license key:");
- System.out.println(" ");
- System.out.println(getConfig().getString("License"));
- System.out.println(" ");
- System.out.println("-----------------------------------");
- return;
- }
- in.close();
- if(!(license)) {
- System.out.println("Leaked version of StaffMode detected, shutting down server.");
- Bukkit.getPluginManager().disablePlugin(Main.instance);
- Main.instance.leaked = true;
- return;
- }
- } catch (Exception ex) {
- if(!Bukkit.getServer().getOnlineMode()) {
- System.out.print("Connection issue with auth servers. Caused by server being in offline mode.");
- } else {
- System.out.print("Connection issue with auth servers.");
- }
- Bukkit.getPluginManager().disablePlugin(Main.instance);
- Main.instance.leaked = true;
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement