Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try{
- String url = "http://www.shadowhcf.com/api.php?username=" + username + "&&password=" + password + "/";
- String answer = "false";
- URL u = new URL(url);
- URLConnection c = (HttpURLConnection) u.openConnection();
- InputStream r = c.getInputStream();
- BufferedReader reader = new BufferedReader(new InputStreamReader(r));
- for(String answer1 = null;(answer = reader.readLine()) != null;) {
- getLogger().info(answer1);
- answer = answer1;
- }
- if(answer != null) {
- if(answer.contains("true")) {
- realRun();
- }
- }else{
- getLogger().info("Username and/or Password is incorrect!");
- getLogger().info("Disabling plugin!");
- this.getPluginLoader().disablePlugin(this);
- }
- }catch(MalformedURLException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement