Skip to content
This repository was archived by the owner on Nov 24, 2018. It is now read-only.

Revert "Fixed a thing that can cause errors" #33

Merged
merged 1 commit into from
Jan 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions src/main/java/me/checkium/vhackapi/vHackAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public class vHackAPI {
protected String password;
protected String username;
protected String userHash;
private JSONObject stats = null;


public Console getConsole() {
Expand All @@ -33,23 +32,16 @@ public SpywareManager getSpywareManager() {
}

public String getStats(Stats stat) {
if(stats == null){
try {
TimeUnit.MILLISECONDS.sleep(200);
} catch (InterruptedException e1) {
try {
TimeUnit.MILLISECONDS.sleep(200);
} catch (InterruptedException e1) {
e1.printStackTrace();
}
stats = Utils.JSONRequest("user::::pass::::uhash", username + "::::" + password + "::::" + userHash, "vh_update.php");
return json.getString(stat.toString());
} else {
return json.getString(stat.toString());
}
JSONObject json = Utils.JSONRequest("user::::pass::::uhash", username + "::::" + password + "::::" + userHash, "vh_update.php");

return json.getString(stat.toString());
}

public void refreshStats() {
stats = null;
}

public PackageOpener getPackageOpener() {
PackageOpener packageOpener = new PackageOpener(username, password, userHash);
return packageOpener;
Expand Down