From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Simon Gardling 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 3e89b266240c32e36a7b2eb49fb87fcd8b3659e5..d825c6b8e46e2a699bdc22d081d627edb2f0c840 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 99e6998782b28b2955005b3333e4c2fe7b3fb2bc..6e925920b61d266aff91d910318d05b68430d5f7 100644 --- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java +++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java @@ -263,4 +263,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); + } + }