mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-23 17:47:35 +01:00
Revert "Add member inheritance for non-player associables"
This reverts commit b1cd1303d1
.
This commit is contained in:
parent
b1cd1303d1
commit
8efc2e6539
@ -87,35 +87,31 @@ private boolean checkNonplayerProtectionDomains(Iterable<? extends ProtectedRegi
|
||||
public Association getAssociation(List<ProtectedRegion> regions) {
|
||||
checkNotNull(source);
|
||||
for (ProtectedRegion region : regions) {
|
||||
while (region != null) {
|
||||
if ((region.getId().equals(ProtectedRegion.GLOBAL_REGION) && source.isEmpty())) {
|
||||
return Association.OWNER;
|
||||
}
|
||||
if ((region.getId().equals(ProtectedRegion.GLOBAL_REGION) && source.isEmpty())) {
|
||||
return Association.OWNER;
|
||||
}
|
||||
|
||||
if (source.contains(region)) {
|
||||
if (useMaxPriorityAssociation) {
|
||||
int priority = region.getPriority();
|
||||
if (priority == maxPriority) {
|
||||
return Association.OWNER;
|
||||
}
|
||||
} else {
|
||||
if (source.contains(region)) {
|
||||
if (useMaxPriorityAssociation) {
|
||||
int priority = region.getPriority();
|
||||
if (priority == maxPriority) {
|
||||
return Association.OWNER;
|
||||
}
|
||||
}
|
||||
|
||||
Set<ProtectedRegion> source;
|
||||
|
||||
if (useMaxPriorityAssociation) {
|
||||
source = maxPriorityRegions;
|
||||
} else {
|
||||
source = this.source;
|
||||
}
|
||||
|
||||
if (checkNonplayerProtectionDomains(source, region.getFlag(Flags.NONPLAYER_PROTECTION_DOMAINS))) {
|
||||
return Association.OWNER;
|
||||
}
|
||||
}
|
||||
|
||||
region = region.getParent();
|
||||
Set<ProtectedRegion> source;
|
||||
|
||||
if (useMaxPriorityAssociation) {
|
||||
source = maxPriorityRegions;
|
||||
} else {
|
||||
source = this.source;
|
||||
}
|
||||
|
||||
if (checkNonplayerProtectionDomains(source, region.getFlag(Flags.NONPLAYER_PROTECTION_DOMAINS))) {
|
||||
return Association.OWNER;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ public void testNonPlayerBuildAccessInOneRegion(boolean useMaxPriorityAssociatio
|
||||
assertTrue(appl.testState(assoc, Flags.BUILD));
|
||||
// Inside fountain
|
||||
appl = manager.getApplicableRegions(inFountain);
|
||||
assertTrue(appl.testState(assoc, Flags.BUILD));
|
||||
assertFalse(appl.testState(assoc, Flags.BUILD));
|
||||
}
|
||||
|
||||
@ParameterizedTest(name = "useMaxPriorityAssociation={0}")
|
||||
|
Loading…
Reference in New Issue
Block a user