mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 03:25:24 +01:00
Added PvP default flag.
This commit is contained in:
parent
dd93772233
commit
005ac41820
@ -73,6 +73,7 @@ regions:
|
||||
default:
|
||||
build: true
|
||||
chest-access: false
|
||||
pvp: true
|
||||
|
||||
blacklist:
|
||||
logging:
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -27,4 +27,5 @@
|
||||
public class GlobalFlags {
|
||||
public boolean canBuild = true;
|
||||
public boolean canAccessChests = false;
|
||||
public boolean canPvP = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user