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: default:
build: true build: true
chest-access: false chest-access: false
pvp: true
blacklist: blacklist:
logging: logging:

View File

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

View File

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

View File

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