mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-28 12:07:35 +01:00
Fixed lag caused by WorldAliasSettings.addWorld #493
This commit is contained in:
parent
cefe17ead8
commit
7faa619ae3
@ -4,6 +4,7 @@
|
||||
*/
|
||||
package com.djrapitops.plan.system.settings;
|
||||
|
||||
import com.djrapitops.plan.system.processing.Processor;
|
||||
import com.djrapitops.plan.system.settings.config.ConfigSystem;
|
||||
import com.djrapitops.plugin.api.config.Config;
|
||||
import com.djrapitops.plugin.api.config.ConfigNode;
|
||||
@ -54,11 +55,13 @@ public class WorldAliasSettings {
|
||||
String previousValue = aliasSect.getConfigNode(world).getValue();
|
||||
if (Verify.isEmpty(previousValue)) {
|
||||
aliasSect.set(world, world);
|
||||
}
|
||||
try {
|
||||
aliasSect.save();
|
||||
} catch (IOException e) {
|
||||
Log.toLog(this.getClass().getName(), e);
|
||||
Processor.queue(() -> {
|
||||
try {
|
||||
aliasSect.save();
|
||||
} catch (IOException e) {
|
||||
Log.toLog(this.getClass().getName(), e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user