mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-26 01:51:19 +01:00
Added auto-invincible-permission setting, which lets you use the permission 'worldguard.auto-invincible' to become invincible.
This commit is contained in:
parent
f5c6a9f507
commit
342cfc0801
@ -82,6 +82,7 @@ public class ConfigurationManager {
|
||||
public boolean suppressTickSyncWarnings;
|
||||
public boolean useRegionsScheduler;
|
||||
public boolean activityHaltToggle = false;
|
||||
public boolean autoGodMode;
|
||||
|
||||
/**
|
||||
* Construct the object.
|
||||
@ -108,6 +109,8 @@ public void load() {
|
||||
"suppress-tick-sync-warnings", false);
|
||||
useRegionsScheduler = config.getBoolean(
|
||||
"regions.use-scheduler", true);
|
||||
autoGodMode = config.getBoolean(
|
||||
"auto-invincible-permission", false);
|
||||
|
||||
// Load configurations for each world
|
||||
for (World world : plugin.getServer().getWorlds()) {
|
||||
|
@ -165,7 +165,8 @@ public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
+ "Fire spread is currently globally disabled for this world.");
|
||||
}
|
||||
|
||||
if (plugin.inGroup(player, "wg-invincible")) {
|
||||
if (plugin.inGroup(player, "wg-invincible")
|
||||
|| (cfg.autoGodMode && plugin.hasPermission(player, "worldguard.auto-invincible"))) {
|
||||
cfg.enableGodMode(player);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user