Added PvP default flag.

This commit is contained in:
sk89q 2011-01-30 01:36:59 -08:00
parent dd93772233
commit 005ac41820
4 changed files with 6 additions and 1 deletions

View File

@ -73,6 +73,7 @@ regions:
default:
build: true
chest-access: false
pvp: true
blacklist:
logging:

View File

@ -301,6 +301,7 @@ public void loadConfiguration() {
regionWand = config.getInt("regions.wand", 287);
globalFlags.canBuild = config.getBoolean("regions.default.build", true);
globalFlags.canAccessChests = config.getBoolean("regions.default.chest-access", false);
globalFlags.canPvP = config.getBoolean("regions.default.pvp", true);
try {
regionLoader.load();

View File

@ -71,6 +71,8 @@ public boolean allowsFlag(String flag) {
if (flag.equals(AreaFlags.FLAG_CHEST_ACCESS)) {
def = global.canAccessChests;
} else if (flag.equals(AreaFlags.FLAG_PVP)) {
def = global.canPvP;
}
return isFlagAllowed(flag, def, null);

View File

@ -27,4 +27,5 @@
public class GlobalFlags {
public boolean canBuild = true;
public boolean canAccessChests = false;
public boolean canPvP = true;
}