mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-09-16 09:06:53 +02:00
fixed /region info and region flag fallback
This commit is contained in:
parent
19cfd9edc6
commit
a8b54757e9
@ -81,7 +81,7 @@ public boolean handle(CommandSender sender, String senderName, String command, S
|
|||||||
s.append(", ");
|
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());
|
sender.sendMessage(ChatColor.BLUE + "Flags: " + s.toString());
|
||||||
|
@ -73,20 +73,29 @@ public boolean isStateFlagAllowed(FlagType type) {
|
|||||||
return isStateFlagAllowed(type, global.getDefaultValue(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) {
|
public boolean isStateFlagAllowed(FlagType type, boolean def) {
|
||||||
|
|
||||||
State defState = def ? State.ALLOW : State.DENY;
|
if(!this.isAnyRegionAffected())
|
||||||
return getStateFlag(type, true).getValue(defState) == State.ALLOW;
|
{
|
||||||
|
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) {
|
public boolean isStateFlagAllowed(FlagType type, boolean def, LocalPlayer player) {
|
||||||
|
|
||||||
State defState = def ? State.ALLOW : State.DENY;
|
if(!this.isAnyRegionAffected())
|
||||||
return getStateFlag(type, true).getValue(defState) == State.ALLOW || this.isMember(player);
|
{
|
||||||
|
return def;
|
||||||
|
}
|
||||||
|
|
||||||
|
return getStateFlag(type, true).getValue(State.DENY) == State.ALLOW || this.isMember(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user