mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-27 21:15:57 +01:00
Added PvP default flag.
This commit is contained in:
parent
dd93772233
commit
005ac41820
@ -73,6 +73,7 @@ regions:
|
|||||||
default:
|
default:
|
||||||
build: true
|
build: true
|
||||||
chest-access: false
|
chest-access: false
|
||||||
|
pvp: true
|
||||||
|
|
||||||
blacklist:
|
blacklist:
|
||||||
logging:
|
logging:
|
||||||
|
@ -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();
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user