mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-12 03:13:40 +01:00
Re-enable god mode on a reload for those who need it.
This commit is contained in:
parent
62d181eb81
commit
3325feb1cb
@ -157,7 +157,15 @@ public void onEnable() {
|
||||
(new WorldGuardEntityListener(this)).registerEvents();
|
||||
(new WorldGuardWeatherListener(this)).registerEvents();
|
||||
(new WorldGuardWorldListener(this)).registerEvents();
|
||||
|
||||
|
||||
// Check god mode for existing players, if any
|
||||
for (Player player : getServer().getOnlinePlayers()) {
|
||||
if (inGroup(player, "wg-invincible") ||
|
||||
(configuration.autoGodMode && hasPermission(player, "worldguard.auto-invincible"))) {
|
||||
configuration.enableGodMode(player);
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("WorldGuard " + this.getDescription().getVersion() + " enabled.");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user