Added the option to hide IP addresses in logs

This commit is contained in:
MrSlenky
2022-07-10 17:44:07 +02:00
parent 42559d83f0
commit 69dc6eaa7d
3 changed files with 24 additions and 0 deletions
@@ -59,6 +59,7 @@ public class ServerProperties {
private GameMode defaultGamemode;
private Location worldSpawn;
private boolean reducedDebugInfo;
private boolean logPlayerIPAddresses;
private boolean allowFlight;
private boolean allowChat;
private Component motd;
@@ -123,6 +124,7 @@ public class ServerProperties {
float pitch = Float.parseFloat(locStr[5]);
worldSpawn = new Location(world, x, y, z, yaw, pitch);
reducedDebugInfo = Boolean.parseBoolean(prop.getProperty("reduced-debug-info"));
logPlayerIPAddresses = Boolean.parseBoolean(prop.getProperty("log-player-ip-addresses"));
allowFlight = Boolean.parseBoolean(prop.getProperty("allow-flight"));
allowChat = Boolean.parseBoolean(prop.getProperty("allow-chat"));
String motdJson = prop.getProperty("motd");
@@ -257,6 +259,10 @@ public class ServerProperties {
return reducedDebugInfo;
}
public boolean isLogPlayerIPAddresses() {
return logPlayerIPAddresses;
}
public boolean isAllowFlight() {
return allowFlight;
}