9
0
mirror of https://github.com/Dreeam-qwq/Gale.git synced 2025-12-23 00:39:22 +00:00
Files
Gale/patches/server/0065-Make-logging-login-locations-configurable.patch
Dreeam a4ed88543a Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@681c013 Bundle spark (#11093)
PaperMC/Paper@5fee9c6 Move configuration option to a system property
PaperMC/Paper@aa3b356 Improve server startup logging (#11110)
PaperMC/Paper@9aea240 Properly lookup plugin classes when looked up by spark
PaperMC/Paper@7e91a2c Update the bundled spark version
2024-07-21 07:11:14 +08:00

45 lines
2.9 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martijn Muijsers <martijnmuijsers@live.nl>
Date: Mon, 26 Dec 2022 00:17:40 +0100
Subject: [PATCH] Make logging login locations configurable
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
Gale - https://galemc.org
This patch is based on the following patch:
"configurable logging of player login location"
By: Simon Gardling <titaniumtown@gmail.com>
As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index d4de82ad3791f87b6f3ddc1b0ee3efd4761f7ba8..35d0a81ea93389f1d4b6e97692771be54bf453d9 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -483,7 +483,13 @@ public abstract class PlayerList {
scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam);
}
// Paper end - Configurable player collision
+ if (GaleGlobalConfiguration.get().logToConsole.playerLoginLocations) { // Gale - JettPack - make logging login location configurable
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
+ // Gale start - JettPack - make logging login location configurable
+ } else {
+ PlayerList.LOGGER.info("{}[{}] logged in with entity id {}", player.getName().getString(), s1, player.getId());
+ }
+ // Gale end - JettPack - make logging login location configurable
}
public void updateEntireScoreboard(ServerScoreboard scoreboard, ServerPlayer player) {
diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
index 3f8c66b35f1910df7d745056fd8f55d9b035b215..b0da100cf972d4e39b130c99550ebcc763f055ee 100644
--- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
+++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java
@@ -63,6 +63,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart {
public boolean unrecognizedRecipes = false; // Gale - Purpur - do not log unrecognized recipes
public boolean legacyMaterialInitialization = false; // Gale - Purpur - do not log legacy Material initialization
public boolean nullIdDisconnections = true; // Gale - Pufferfish - do not log disconnections with null id
+ public boolean playerLoginLocations = true; // Gale - JettPack - make logging login location configurable
public Chat chat;
public class Chat extends ConfigurationPart {