Added common configuration file with the following exposed values: graceEnabled, graceLength and keyRefillAir. This has not been tested in LAN.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
package com.micle.loginprotection.data;
|
||||
|
||||
import com.micle.loginprotection.setup.Config;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraftforge.fmllegacy.server.ServerLifecycleHooks;
|
||||
@ -38,7 +39,7 @@ public class ProtectedPlayers {
|
||||
protected_players.remove(protected_player);
|
||||
|
||||
ServerPlayer player = ServerLifecycleHooks.getCurrentServer().getPlayerList().getPlayer(player_uuid);
|
||||
if (player == null) { return; }
|
||||
if (player == null || !Config.GRACE_ENABLED.get()) { return; }
|
||||
player.sendMessage(new TextComponent("Grace Period over!"), player_uuid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user