mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-27 21:15:57 +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.
|
* Called on plugin enable.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
|
||||||
@ -152,7 +153,8 @@ public void run() {
|
|||||||
flagStateManager = new FlagStateManager(this);
|
flagStateManager = new FlagStateManager(this);
|
||||||
|
|
||||||
if (configuration.useRegionsScheduler) {
|
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
|
// Register events
|
||||||
@ -194,6 +196,7 @@ public void run() {
|
|||||||
/**
|
/**
|
||||||
* Called on plugin disable.
|
* Called on plugin disable.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
globalRegionManager.unload();
|
globalRegionManager.unload();
|
||||||
configuration.unload();
|
configuration.unload();
|
||||||
|
Loading…
Reference in New Issue
Block a user