mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-09-09 12:38:01 +02:00
Don't attempt to refresh auto op if server is stopping (#1989)
This commit is contained in:
parent
e66ab1be0d
commit
6fea194ef5
@ -88,6 +88,7 @@ public class LPBukkitBootstrap extends JavaPlugin implements LuckPermsBootstrap
|
||||
private final CountDownLatch loadLatch = new CountDownLatch(1);
|
||||
private final CountDownLatch enableLatch = new CountDownLatch(1);
|
||||
private boolean serverStarting = true;
|
||||
private boolean serverStopping = false;
|
||||
|
||||
// if the plugin has been loaded on an incompatible version
|
||||
private boolean incompatibleVersion = false;
|
||||
@ -150,6 +151,8 @@ public class LPBukkitBootstrap extends JavaPlugin implements LuckPermsBootstrap
|
||||
return;
|
||||
}
|
||||
|
||||
this.serverStopping = true;
|
||||
this.serverStopping = false;
|
||||
this.startTime = Instant.now();
|
||||
try {
|
||||
this.plugin.enable();
|
||||
@ -167,8 +170,8 @@ public class LPBukkitBootstrap extends JavaPlugin implements LuckPermsBootstrap
|
||||
return;
|
||||
}
|
||||
|
||||
this.serverStopping = true;
|
||||
this.plugin.disable();
|
||||
this.serverStarting = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -185,6 +188,10 @@ public class LPBukkitBootstrap extends JavaPlugin implements LuckPermsBootstrap
|
||||
return this.serverStarting;
|
||||
}
|
||||
|
||||
public boolean isServerStopping() {
|
||||
return this.serverStopping;
|
||||
}
|
||||
|
||||
// provide information about the plugin
|
||||
|
||||
@Override
|
||||
|
@ -333,6 +333,10 @@ public class LPBukkitPlugin extends AbstractLuckPermsPlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!callerIsSync && this.bootstrap.isServerStopping()) {
|
||||
return;
|
||||
}
|
||||
|
||||
User user = getUserManager().getIfLoaded(player.getUniqueId());
|
||||
boolean value;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user