fixed /region info and region flag fallback

This commit is contained in:
Redecouverte 2011-02-28 18:36:19 +01:00
parent 19cfd9edc6
commit a8b54757e9
2 changed files with 18 additions and 9 deletions

View File

@ -81,7 +81,7 @@ public boolean handle(CommandSender sender, String senderName, String command, S
s.append(", ");
}
s.append(flags.getFlag(nfo.type).toString());
s.append(nfo.name + ": " + flags.getFlag(nfo.type).toString());
}
sender.sendMessage(ChatColor.BLUE + "Flags: " + s.toString());

View File

@ -73,20 +73,29 @@ public boolean isStateFlagAllowed(FlagType type) {
return isStateFlagAllowed(type, global.getDefaultValue(type));
}
public boolean isStateFlagAllowed(FlagType type, LocalPlayer player) {
return isStateFlagAllowed(type, global.getDefaultValue(type)) || this.isMember(player);
}
public boolean isStateFlagAllowed(FlagType type, boolean def) {
State defState = def ? State.ALLOW : State.DENY;
return getStateFlag(type, true).getValue(defState) == State.ALLOW;
if(!this.isAnyRegionAffected())
{
return def;
}
return getStateFlag(type, true).getValue(State.DENY) == State.ALLOW;
}
public boolean isStateFlagAllowed(FlagType type, LocalPlayer player) {
return isStateFlagAllowed(type, global.getDefaultValue(type), player);
}
public boolean isStateFlagAllowed(FlagType type, boolean def, LocalPlayer player) {
State defState = def ? State.ALLOW : State.DENY;
return getStateFlag(type, true).getValue(defState) == State.ALLOW || this.isMember(player);
if(!this.isAnyRegionAffected())
{
return def;
}
return getStateFlag(type, true).getValue(State.DENY) == State.ALLOW || this.isMember(player);
}