Added some config saving code
This commit is contained in:
parent
19dd0f5ef5
commit
73280fa88e
1 changed files with 8 additions and 1 deletions
|
@ -49,6 +49,10 @@ public class DiscordPlugin extends JavaPlugin implements IListener<ReadyEvent> {
|
|||
lastannouncementtime = getConfig().getLong("lastannouncementtime");
|
||||
lastseentime = getConfig().getLong("lastseentime");
|
||||
Test = getConfig().getBoolean("test", true);
|
||||
getConfig().set("lastannouncementtime", lastannouncementtime);
|
||||
getConfig().set("lastseentime", lastseentime);
|
||||
getConfig().set("test", Test); // TODO: TMP
|
||||
saveConfig();
|
||||
}
|
||||
ClientBuilder cb = new ClientBuilder();
|
||||
cb.withToken(Files.readFirstLine(new File("TBMC", "Token.txt"), StandardCharsets.UTF_8));
|
||||
|
@ -116,6 +120,9 @@ public class DiscordPlugin extends JavaPlugin implements IListener<ReadyEvent> {
|
|||
@Override
|
||||
public void onDisable() {
|
||||
stop = true;
|
||||
getConfig().set("lastannouncementtime", lastannouncementtime);
|
||||
getConfig().set("lastseentime", lastseentime);
|
||||
saveConfig();
|
||||
try {
|
||||
dc.changeStatus(Status.game("on TBMC"));
|
||||
dc.logout();
|
||||
|
|
Loading…
Reference in a new issue