Re-enable god mode on a reload for those who need it.

This commit is contained in:
Wizjany 2011-06-28 01:05:51 -04:00
parent 62d181eb81
commit 3325feb1cb

View File

@ -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.");
}