mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-09-30 07:37:31 +02:00
Do a better check of the global region.
This commit is contained in:
parent
a2e14bc76a
commit
51982cda28
@ -24,7 +24,6 @@
|
||||
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
||||
import com.sk89q.worldguard.protection.association.RegionAssociable;
|
||||
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
||||
import com.sk89q.worldguard.protection.regions.RegionType;
|
||||
import org.bukkit.Location;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@ -66,7 +65,7 @@ public Association getAssociation(ProtectedRegion region) {
|
||||
source = result.getRegions();
|
||||
}
|
||||
|
||||
if ((region.getType() == RegionType.GLOBAL && source.isEmpty()) || source.contains(region)) {
|
||||
if ((region.getId().equals(ProtectedRegion.GLOBAL_REGION) && source.isEmpty()) || source.contains(region)) {
|
||||
return Association.OWNER;
|
||||
} else {
|
||||
return Association.NON_MEMBER;
|
||||
|
Loading…
Reference in New Issue
Block a user