Do a better check of the global region.

This commit is contained in:
sk89q 2015-01-04 18:51:18 -08:00
parent a2e14bc76a
commit 51982cda28

View File

@ -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;