Multiple Changes Check Commits (#48)

* Temp Hiscores & SettingsLoader changes

 Registered Accounts cycle count change

* EverythingRS Heatmap
This commit is contained in:
Josh Shippam
2019-10-10 15:59:59 +01:00
committed by Daniel Ginovker
parent 83e612b50f
commit 5b4c669d64
8 changed files with 38 additions and 10 deletions
@@ -33,7 +33,7 @@ public class PlayersOnlineWebsite {
}
} else if (hasntwared) {
hasntwared = false;
System.out.println("No Players Online On Website Password Set So Task Stopped");
System.out.println("No Website Password Set So Website Integration Tasks Stopped");
}
}
}
@@ -16,13 +16,13 @@ public class RegisteredAccsWebsite {
url.openStream().close();
}
private static int count = 50;
private static int count = 25;
public static void addUpdateRegisteredUsersTask() {
if (password != null && !password.equals("")) {
if (count == 0) {
try {
setAccountsRegistered(new File("data/characters/").list().length);
count = 50;
count = 150;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -32,7 +32,6 @@ public class RegisteredAccsWebsite {
}
} else if (hasntwarned) {
hasntwarned = false;
System.out.println("You need to provide the powpass secret to use this!");
}
}
}
@@ -1,6 +1,8 @@
package redone.integrations;
import org.json.JSONObject;
import redone.Server;
import redone.game.players.Client;
import redone.integrations.discord.JavaCord;
import java.io.*;
@@ -11,7 +13,8 @@ public class SettingsLoader {
JSONObject main = new JSONObject();
main
.put("bot-token", "")
.put("powpass", "");
.put("websitepass", "")
.put("erssecret", "");
try {
BufferedWriter br = new BufferedWriter(new FileWriter("data/secrets.json"));
br.write(main.toString());
@@ -25,7 +28,7 @@ public class SettingsLoader {
if (!new File("data/secrets.json").exists()) {
initialize();
System.out.println("Please open \"data/secrets.json\" file and enter your discord token bot there!");
System.out.println("Please open \"data/secrets.json\" file and enter your Players Online On Website Password there!");
System.out.println("Please open \"data/secrets.json\" file and enter your Website Password there!");
} else {
BufferedReader br = new BufferedReader(new FileReader("data/secrets.json"));
@@ -33,7 +36,10 @@ public class SettingsLoader {
JSONObject obj = new JSONObject(out);
JavaCord.token = obj.getString("bot-token");
PlayersOnlineWebsite.password = obj.getString("powpass");
PlayersOnlineWebsite.password = obj.getString("websitepass");
RegisteredAccsWebsite.password = obj.getString("websitepass");
Client.ersSecret = obj.getString("erssecret");
Server.ersSecret = obj.getString("erssecret");
}
}