Advertisement
Guest User

Untitled

a guest
May 12th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. try{
  2.  
  3. String url = "http://www.shadowhcf.com/api.php?username=" + username + "&&password=" + password + "/";
  4. String answer = "false";
  5.  
  6. URL u = new URL(url);
  7. URLConnection c = (HttpURLConnection) u.openConnection();
  8. InputStream r = c.getInputStream();
  9. BufferedReader reader = new BufferedReader(new InputStreamReader(r));
  10. for(String answer1 = null;(answer = reader.readLine()) != null;) {
  11. getLogger().info(answer1);
  12. answer = answer1;
  13. }
  14.  
  15. if(answer != null) {
  16. if(answer.contains("true")) {
  17. realRun();
  18. }
  19. }else{
  20. getLogger().info("Username and/or Password is incorrect!");
  21. getLogger().info("Disabling plugin!");
  22. this.getPluginLoader().disablePlugin(this);
  23. }
  24.  
  25. }catch(MalformedURLException e) {
  26. e.printStackTrace();
  27. } catch (IOException e) {
  28. e.printStackTrace();
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement