mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-04 16:49:04 +00:00
Multiple Changes Check Commits (#48)
* Temp Hiscores & SettingsLoader changes Registered Accounts cycle count change * EverythingRS Heatmap
This commit is contained in:
committed by
Daniel Ginovker
parent
83e612b50f
commit
5b4c669d64
@@ -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");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user