Initial port of version 2.1.0 from the 1.16 branch.

This commit is contained in:
2021-09-30 23:25:13 +01:00
parent 24ed48df22
commit cfdc2de08f
6 changed files with 185 additions and 83 deletions

View File

@ -39,8 +39,10 @@ public class ProtectedPlayers {
protected_players.remove(protected_player);
ServerPlayer player = ServerLifecycleHooks.getCurrentServer().getPlayerList().getPlayer(player_uuid);
if (player == null || !Config.POST_GRACE_ENABLED.get()) { return; }
player.sendMessage(new TextComponent("Grace Period over!"), player_uuid);
if (player == null) { return; }
if (!Config.Server.POST_GRACE_ENABLED.get()) { return; }
player.sendMessage(new TextComponent("[LoginProtection] Grace period ended!"), player_uuid);
}
public void updateGracePeriod(UUID player_uuid) {
@ -51,7 +53,6 @@ public class ProtectedPlayers {
protected_player.setGracePeriod(grace_period);
if (grace_period <= 0) {
removePlayer(player_uuid);
System.out.println(protected_player.getPlayerUUID() + " is no longer being protected!");
}
}
}