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;
|
package com.djrapitops.plan.system.settings;
|
||||||
|
|
||||||
|
import com.djrapitops.plan.system.processing.Processor;
|
||||||
import com.djrapitops.plan.system.settings.config.ConfigSystem;
|
import com.djrapitops.plan.system.settings.config.ConfigSystem;
|
||||||
import com.djrapitops.plugin.api.config.Config;
|
import com.djrapitops.plugin.api.config.Config;
|
||||||
import com.djrapitops.plugin.api.config.ConfigNode;
|
import com.djrapitops.plugin.api.config.ConfigNode;
|
||||||
@ -54,11 +55,13 @@ public class WorldAliasSettings {
|
|||||||
String previousValue = aliasSect.getConfigNode(world).getValue();
|
String previousValue = aliasSect.getConfigNode(world).getValue();
|
||||||
if (Verify.isEmpty(previousValue)) {
|
if (Verify.isEmpty(previousValue)) {
|
||||||
aliasSect.set(world, world);
|
aliasSect.set(world, world);
|
||||||
}
|
Processor.queue(() -> {
|
||||||
try {
|
try {
|
||||||
aliasSect.save();
|
aliasSect.save();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.toLog(this.getClass().getName(), e);
|
Log.toLog(this.getClass().getName(), e);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user