mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-28 20:19:00 +01:00
Fixed #WORLDGUARD-2289, FlagStateManager is not thread synced with the main thread.
This commit is contained in:
parent
93f062d4e3
commit
8f409d47d9
@ -108,6 +108,7 @@ public boolean hasPermission(CommandSender player, String perm) {
|
||||
/**
|
||||
* Called on plugin enable.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onEnable() {
|
||||
|
||||
@ -152,7 +153,8 @@ public void run() {
|
||||
flagStateManager = new FlagStateManager(this);
|
||||
|
||||
if (configuration.useRegionsScheduler) {
|
||||
getServer().getScheduler().scheduleAsyncRepeatingTask(this, flagStateManager, FlagStateManager.RUN_DELAY, FlagStateManager.RUN_DELAY);
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, flagStateManager,
|
||||
FlagStateManager.RUN_DELAY, FlagStateManager.RUN_DELAY);
|
||||
}
|
||||
|
||||
// Register events
|
||||
@ -194,6 +196,7 @@ public void run() {
|
||||
/**
|
||||
* Called on plugin disable.
|
||||
*/
|
||||
@Override
|
||||
public void onDisable() {
|
||||
globalRegionManager.unload();
|
||||
configuration.unload();
|
||||
|
Loading…
Reference in New Issue
Block a user