xeRicker

Untitled

Jul 21st, 2016
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. private void checkLicense() {
  2. try {
  3. URL url = new URL("PASTEBIN LINK");
  4. BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(url.openStream()));
  5. String line;
  6. while ((line = bufferedReader.readLine()) != null) {
  7. if (line.equalsIgnoreCase("%%__USER__%%")) {
  8. getLogger().log(Level.WARNING, "The user who downloaded the plugin has been black-listed. The plugin will be disabled!");
  9. Bukkit.getPluginManager().disablePlugin(this);
  10. break;
  11. }
  12. }
  13. bufferedReader.close();
  14. } catch (Exception exception) {
  15. getLogger().log(Level.WARNING, "An error occured while checking the plugin's license. The plugin will be disabled!");
  16. Bukkit.getPluginManager().disablePlugin(this);
  17. exception.printStackTrace();
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment