delay group loading by 1 tick to allow permissions to load

This commit is contained in:
okx-code
2026-05-08 04:43:11 +01:00
parent 020ae42bad
commit 7599c6a297

View File

@@ -75,7 +75,10 @@ public class NameLayerPlugin extends ACivMod {
if (loadGroups) {
PermissionType.initialize();
blackList = new BlackList();
groupCache = NameLayerGroupCache.loadAll(nameLayerReadDao, getLogger());
groupCache = new NameLayerGroupCache();
Bukkit.getScheduler().runTaskAsynchronously(this, () -> {
groupCache = NameLayerGroupCache.loadAll(nameLayerReadDao, getLogger());
});
startInvalidationConsumer();
if (config.getBoolean("groups.interact", true)) {
defaultGroupHandler = new DefaultGroupHandler();