-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
-
use-block-disassembler -
use-block-placer -
use-crusher- これら(Disassembler/Placer/Crusher)はNBTタグ
Placerを持つので、TYPE-A。
- これら(Disassembler/Placer/Crusher)はNBTタグ
-
use-monster-ball- ThrowEventで判定して防ぐ。TYPE-A。
TYPE-A
Player executor; // Player or UUID
boolean allowed = false;
if (isProtectedArea(loc)) {
List<ProtectedCuboidRegion> regions = getProtectedRegions(loc);
ProtectedCuboidRegion region = regions.stream().max(Comparator.comparingInt(ProtectedCuboidRegion::getPriority)).orElse(null);
if (region != null) {
FlagState state = region.getFlagState(CustomFlags.CUSTOM_FLAG);
if (state == FlagState.UNSET) { // -
allowed = region.isOwner(executor.getUniqueId()) || region.isMember(executor.getUniqueId());
} else if (state == FlagState.ALLOW) { // allow
allowed = true;
} else { // deny
allowed = region.isOwner(executor.getUniqueId());
}
}
}Reactions are currently unavailable