mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-16 23:55:23 +01:00
Removed isMember()/isOwner() as it is no longer relevant (to be placed with FlagResolvers).
This commit is contained in:
parent
27c6819df9
commit
355168a3ac
@ -18,10 +18,6 @@
|
||||
*/
|
||||
package com.sk89q.worldguard.region.flags;
|
||||
|
||||
import com.sk89q.worldguard.LocalPlayer;
|
||||
import com.sk89q.worldguard.region.ApplicableRegionSet;
|
||||
import com.sk89q.worldguard.region.Region;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author sk89q
|
||||
@ -60,53 +56,4 @@ public RegionGroup detectValue(String input) {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isMember(Region region, RegionGroup group, LocalPlayer player) {
|
||||
if (group == null || group == RegionGroup.ALL) {
|
||||
return true;
|
||||
} else if (group == RegionGroup.OWNERS) {
|
||||
if (region.isOwner(player)) {
|
||||
return true;
|
||||
}
|
||||
} else if (group == RegionGroup.MEMBERS) {
|
||||
if (region.isMember(player)) {
|
||||
return true;
|
||||
}
|
||||
} else if (group == RegionGroup.NON_OWNERS) {
|
||||
if (!region.isOwner(player)) {
|
||||
return true;
|
||||
}
|
||||
} else if (group == RegionGroup.NON_MEMBERS) {
|
||||
if (!region.isMember(player)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isMember(ApplicableRegionSet set,
|
||||
RegionGroup group, LocalPlayer player) {
|
||||
if (group == null || group == RegionGroup.ALL) {
|
||||
return true;
|
||||
} else if (group == RegionGroup.OWNERS) {
|
||||
if (set.isOwnerOfAll(player)) {
|
||||
return true;
|
||||
}
|
||||
} else if (group == RegionGroup.MEMBERS) {
|
||||
if (set.isMemberOfAll(player)) {
|
||||
return true;
|
||||
}
|
||||
} else if (group == RegionGroup.NON_OWNERS) {
|
||||
if (!set.isOwnerOfAll(player)) {
|
||||
return true;
|
||||
}
|
||||
} else if (group == RegionGroup.NON_MEMBERS) {
|
||||
if (!set.isMemberOfAll(player)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user