Updated implementation of Config.java. Fixed issue where server would create infinite amounts of backup files for the config file; this was caused by checking if the allowedKeys list values were of type KEYS instead of String.

This commit is contained in:
2021-09-30 23:01:58 +01:00
parent 4c95ba61da
commit 603cceac93
6 changed files with 144 additions and 138 deletions

View File

@ -16,8 +16,8 @@ public class OnLivingSetAttackTargetEventHandler {
ProtectedPlayer player = LoginProtection.protected_players.getPlayer(target.getUUID());
if (player == null) { return; }
if (player.isLoading() && !Config.MAIN_IGNORE_PLAYER_ENABLED.get()) { return; }
if (!player.isLoading() && !Config.POST_GRACE_IGNORE_PLAYER_ENABLED.get()) { return; }
if (player.isLoading() && !Config.Server.MAIN_IGNORE_PLAYER_ENABLED.get()) { return; }
if (!player.isLoading() && !Config.Server.POST_GRACE_IGNORE_PLAYER_ENABLED.get()) { return; }
((MobEntity) event.getEntityLiving()).setTarget(null);
}
}