Event things

This commit is contained in:
Anuken
2020-08-04 15:14:01 -04:00
parent 0d4e75fc42
commit b11908f509
9 changed files with 72 additions and 84 deletions

View File

@@ -161,7 +161,7 @@ public class ServerControl implements ApplicationListener{
});
//autosave periodically
Events.on(Trigger.update, () -> {
Events.run(Trigger.update, () -> {
if(state.isPlaying() && Config.autosave.bool()){
if(autosaveCount.get(Config.autosaveSpacing.num() * 60)){
int max = Config.autosaveAmount.num();
@@ -194,7 +194,7 @@ public class ServerControl implements ApplicationListener{
}
});
Events.on(Trigger.socketConfigChanged, () -> {
Events.run(Trigger.socketConfigChanged, () -> {
toggleSocket(false);
toggleSocket(Config.socketInput.bool());
});