public void initialize() {
public boolean checkVotes(String playerName) {
try {
String urlString = "http://exion.biz/vote.php?type=checkvote&username="+playerName;
urlString = urlString.replaceAll(" ", "%20");
URL url = new URL(urlString);
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
String results = reader.readLine();
if(results.length() > 0) {
if(results.equals("User needs reward..."))
return true;
else
return false;
}
} catch (MalformedURLException e) {
System.out.println("Malformed URL Exception in checkVotes(String playerName)");
} catch (IOException e) {
System.out.println("IO Exception in checkVotes(String playerName)");
}
return false;
}
synchronized (this) {