Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-09-06 16:12:51 +02:00
Run residence permission playerHas check on main thread
Dieser Commit ist enthalten in:
Ursprung
275ba9bd84
Commit
e6b18cf230
@ -5,6 +5,7 @@ import com.bekvon.bukkit.residence.protection.ClaimedResidence;
|
||||
import com.bekvon.bukkit.residence.protection.CuboidArea;
|
||||
import com.fastasyncworldedit.bukkit.FaweBukkit;
|
||||
import com.fastasyncworldedit.core.regions.FaweMask;
|
||||
import com.fastasyncworldedit.core.util.TaskManager;
|
||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||
import com.sk89q.worldedit.internal.util.LogManagerCompat;
|
||||
import com.sk89q.worldedit.regions.CuboidRegion;
|
||||
@ -29,7 +30,10 @@ public class ResidenceFeature extends BukkitMaskManager implements Listener {
|
||||
}
|
||||
|
||||
public boolean isAllowed(Player player, ClaimedResidence residence, MaskType type) {
|
||||
return residence != null && (residence.getOwner().equals(player.getName()) || residence.getOwner().equals(player.getUniqueId().toString()) || type == MaskType.MEMBER && residence.getPermissions().playerHas(player, "build", false));
|
||||
return residence != null &&
|
||||
(residence.getOwner().equals(player.getName()) ||
|
||||
residence.getOwner().equals(player.getUniqueId().toString()) ||
|
||||
type == MaskType.MEMBER && TaskManager.IMP.sync(() -> residence.getPermissions().playerHas(player, "build", false)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren