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

Commit 6ce8cb4

Browse files
authored
Merge pull request #33 from OlympicCode/revert-32-master
Revert "Fixed a thing that can cause errors"
2 parents 5b02d78 + faf1937 commit 6ce8cb4

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

src/main/java/me/checkium/vhackapi/vHackAPI.java

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ public class vHackAPI {
1515
protected String password;
1616
protected String username;
1717
protected String userHash;
18-
private JSONObject stats = null;
1918

2019

2120
public Console getConsole() {
@@ -33,23 +32,16 @@ public SpywareManager getSpywareManager() {
3332
}
3433

3534
public String getStats(Stats stat) {
36-
if(stats == null){
37-
try {
38-
TimeUnit.MILLISECONDS.sleep(200);
39-
} catch (InterruptedException e1) {
35+
try {
36+
TimeUnit.MILLISECONDS.sleep(200);
37+
} catch (InterruptedException e1) {
4038
e1.printStackTrace();
41-
}
42-
stats = Utils.JSONRequest("user::::pass::::uhash", username + "::::" + password + "::::" + userHash, "vh_update.php");
43-
return json.getString(stat.toString());
44-
} else {
45-
return json.getString(stat.toString());
4639
}
40+
JSONObject json = Utils.JSONRequest("user::::pass::::uhash", username + "::::" + password + "::::" + userHash, "vh_update.php");
41+
42+
return json.getString(stat.toString());
4743
}
4844

49-
public void refreshStats() {
50-
stats = null;
51-
}
52-
5345
public PackageOpener getPackageOpener() {
5446
PackageOpener packageOpener = new PackageOpener(username, password, userHash);
5547
return packageOpener;

0 commit comments

Comments
 (0)