Turn off god mode on login if player doesn't have the permission (closes #1445) (#1475)

This commit is contained in:
flcmc 2017-08-13 11:42:59 -04:00 committed by Ali 'SupaHam' M
parent eb341c0704
commit 91b2622ba2
1 changed files with 5 additions and 0 deletions

View File

@ -301,6 +301,11 @@ public class EssentialsPlayerListener implements Listener {
ess.getLogger().log(Level.INFO, "Set socialspy to false for {0} because they had it enabled without permission.", user.getName());
}
if (user.isGodModeEnabled() && !user.isAuthorized("essentials.god")) {
user.setGodModeEnabled(false);
ess.getLogger().log(Level.INFO, "Set god mode to false for {0} because they had it enabled without permission.", user.getName());
}
user.stopTransaction();
}