mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +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;
|
package com.fastasyncworldedit.bukkit.regions;
|
||||||
|
|
||||||
import com.fastasyncworldedit.core.regions.FaweMask;
|
import com.fastasyncworldedit.core.regions.FaweMask;
|
||||||
|
import com.fastasyncworldedit.core.util.TaskManager;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||||
import com.sk89q.worldedit.bukkit.BukkitWorld;
|
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) {
|
public boolean isAllowed(Player player, Claim claim, MaskType type) {
|
||||||
return claim != null && (claim.getOwnerName().equalsIgnoreCase(player.getName()) || claim
|
return claim != null && (claim.getOwnerName().equalsIgnoreCase(player.getName()) || claim
|
||||||
.getOwnerName()
|
.getOwnerName()
|
||||||
.equals(player.getUniqueId()) ||
|
.equals(player.getUniqueId()) || TaskManager.taskManager().sync(() -> type == MaskType.MEMBER &&
|
||||||
type == MaskType.MEMBER && claim.allowBuild(player, Material.AIR) == null);
|
claim.allowBuild(player, Material.AIR) == null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user