mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
fix: Run GriefPrevention region check in sync (#1804)
* fix: Run GP check in sync Fixes #1692 * refactor: Sync on last condition only
This commit is contained in:
parent
1a3b0dc133
commit
5b2f8502fb
@ -1,6 +1,7 @@
|
||||
package com.fastasyncworldedit.bukkit.regions;
|
||||
|
||||
import com.fastasyncworldedit.core.regions.FaweMask;
|
||||
import com.fastasyncworldedit.core.util.TaskManager;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||
import com.sk89q.worldedit.bukkit.BukkitWorld;
|
||||
@ -28,8 +29,8 @@ public class GriefPreventionFeature extends BukkitMaskManager implements Listene
|
||||
public boolean isAllowed(Player player, Claim claim, MaskType type) {
|
||||
return claim != null && (claim.getOwnerName().equalsIgnoreCase(player.getName()) || claim
|
||||
.getOwnerName()
|
||||
.equals(player.getUniqueId()) ||
|
||||
type == MaskType.MEMBER && claim.allowBuild(player, Material.AIR) == null);
|
||||
.equals(player.getUniqueId()) || TaskManager.taskManager().sync(() -> type == MaskType.MEMBER &&
|
||||
claim.allowBuild(player, Material.AIR) == null));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user