Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 00:00:41 +01:00
Ursprung
6ec1ba39c6
Commit
29fcce7ec8
@ -105,6 +105,8 @@ public interface GeyserConfiguration {
|
||||
|
||||
int getCustomSkullRenderDistance();
|
||||
|
||||
boolean isLogPlayerIpAddresses();
|
||||
|
||||
boolean isNotifyOnNewBedrockUpdate();
|
||||
|
||||
IMetricsInfo getMetrics();
|
||||
|
@ -148,6 +148,9 @@ public abstract class GeyserJacksonConfiguration implements GeyserConfiguration
|
||||
@JsonProperty("xbox-achievements-enabled")
|
||||
private boolean xboxAchievementsEnabled = false;
|
||||
|
||||
@JsonProperty("log-player-ip-addresses")
|
||||
private boolean logPlayerIpAddresses = true;
|
||||
|
||||
@JsonProperty("notify-on-new-bedrock-update")
|
||||
private boolean notifyOnNewBedrockUpdate = true;
|
||||
|
||||
|
@ -84,14 +84,16 @@ public class ConnectorServerEventHandler implements BedrockServerEventHandler {
|
||||
}
|
||||
}
|
||||
|
||||
geyser.getLogger().info(GeyserLocale.getLocaleStringLog("geyser.network.attempt_connect", inetSocketAddress));
|
||||
String ip = geyser.getConfig().isLogPlayerIpAddresses() ? inetSocketAddress.toString() : "<IP address withheld>";
|
||||
geyser.getLogger().info(GeyserLocale.getLocaleStringLog("geyser.network.attempt_connect", ip));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BedrockPong onQuery(InetSocketAddress inetSocketAddress) {
|
||||
if (geyser.getConfig().isDebugMode() && PRINT_DEBUG_PINGS) {
|
||||
geyser.getLogger().debug(GeyserLocale.getLocaleStringLog("geyser.network.pinged", inetSocketAddress));
|
||||
String ip = geyser.getConfig().isLogPlayerIpAddresses() ? inetSocketAddress.toString() : "<IP address withheld>";
|
||||
geyser.getLogger().debug(GeyserLocale.getLocaleStringLog("geyser.network.pinged", ip));
|
||||
}
|
||||
|
||||
GeyserConfiguration config = geyser.getConfig();
|
||||
|
@ -135,7 +135,6 @@ import org.geysermc.geyser.util.MathUtils;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.net.ConnectException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Instant;
|
||||
@ -1045,7 +1044,7 @@ public class GeyserSession implements GeyserConnection, CommandSender {
|
||||
} else {
|
||||
// Downstream's disconnect will fire an event that prints a log message
|
||||
// Otherwise, we print a message here
|
||||
InetAddress address = upstream.getAddress().getAddress();
|
||||
String address = geyser.getConfig().isLogPlayerIpAddresses() ? upstream.getAddress().getAddress().toString() : "<IP address withheld>";
|
||||
geyser.getLogger().info(GeyserLocale.getLocaleStringLog("geyser.network.disconnect", address, reason));
|
||||
}
|
||||
if (!upstream.isClosed()) {
|
||||
|
@ -175,6 +175,9 @@ force-resource-packs: true
|
||||
# THIS DISABLES ALL COMMANDS FROM SUCCESSFULLY RUNNING FOR BEDROCK IN-GAME, as otherwise Bedrock thinks you are cheating.
|
||||
xbox-achievements-enabled: false
|
||||
|
||||
# Whether player IP addresses will be logged by the server.
|
||||
log-player-ip-addresses: true
|
||||
|
||||
# Whether to alert the console and operators that a new Geyser version is available that supports a Bedrock version
|
||||
# that this Geyser version does not support. It's recommended to keep this option enabled, as many Bedrock platforms
|
||||
# auto-update.
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren