Yatopia/patches/server-remap-in-progress/remap in progress/0053-add-config-for-logging-login-location.patch
2021-06-16 19:58:18 +02:00

41 lines
2.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Simon Gardling <titaniumtown@gmail.com>
Date: Wed, 20 Jan 2021 16:36:48 -0500
Subject: [PATCH] add config for logging login location
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index bc3adc076870cc7cfb61ac1fa9e4c939b714ef57..27fdce74d3ff886ceea4b74cb5465b20c74ebe93 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -480,7 +480,14 @@ public abstract class PlayerList {
}
// Paper end
// CraftBukkit - Moved from above, added world
+
+ // Yatopia start - configurable logging of player login location
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.logPlayerLoginLoc) {
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, entityplayer.getId(), worldserver1.worldDataServer.getName(), entityplayer.locX(), entityplayer.locY(), entityplayer.locZ());
+ } else {
+ PlayerList.LOGGER.info("{}[{}] logged in with entity id {}", entityplayer.getDisplayName().getString(), s1, entityplayer.getId());
+ }
+ // Yatopia end - configurable logging of player login location
}
public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) {
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 1eb56babfea75054dffd4c6b9cb00ddd93ebdf96..b246e6450130964cf91d0be81fbddae6598d9d8c 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -260,4 +260,10 @@ public class YatopiaConfig {
private static void tickEnchantingTables() {
shouldTickEnchantingTables = getBoolean("settings.tick.enchanting-tables", shouldTickEnchantingTables);
}
+
+ public static boolean logPlayerLoginLoc = true;
+ private static void general() {
+ logPlayerLoginLoc = getBoolean("settings.log-player-login-location", logPlayerLoginLoc);
+ }
+
}