Fix WorldGuard external hook error

This commit is contained in:
Flowsqy 2022-12-18 17:38:38 +01:00
parent d810f67091
commit b3990566bb

View File

@ -10,11 +10,10 @@ public class WGLoader extends ExternalLoader {
// Maybe need to enable listener for deny message (see old listeners2)
private final WGFlagRegistry flagRegistry;
private WGFlagRegistry flagRegistry;
public WGLoader(HookManager hookManager, ExternalLoadData loadData) {
super(hookManager, loadData);
this.flagRegistry = new WGFlagRegistry();
}
@Override
@ -40,6 +39,9 @@ public class WGLoader extends ExternalLoader {
@Override
public void load() {
// Register flags
if (flagRegistry == null) {
flagRegistry = new WGFlagRegistry();
}
flagRegistry.initialize(loadData);
flagRegistry.register();
}