Add config option for logging login location (#346)

This commit is contained in:
Simon Gardling 2021-01-21 00:47:05 -05:00 committed by GitHub
parent e1249c4648
commit 19b1495d69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 47 additions and 6 deletions

View File

@ -10,16 +10,16 @@ This is an overview over all patches that are currently used.
| ----- | ------------- |:-------------:| -----:|
| server | Add 5 second tps average in /tps | William Blake Galbreath | |
| api | Add ChatColor.getById | Aikar | |
| api | Add GameProfileLookupEvent | tr7zw | |
| server | Add GameProfileLookupEvent | tr7zw | |
| api | Add GameProfileLookupEvent | tr7zw | |
| server | Add IntelliJ IDEA runnable | Bud Gidiere | |
| server | Add JsonList save timings | Ivan Pekov | |
| api | Add NBT API as a first-class lib | tr7zw | |
| server | Add NBT API as a first-class lib | tr7zw | |
| api | Add NBT API as a first-class lib | tr7zw | |
| server | Add a special case for floodgate and offline uuids | Ivan Pekov | |
| server | Add component util | William Blake Galbreath | |
| api | Add last tick time API | Ivan Pekov | tr7zw |
| server | Add last tick time API | Ivan Pekov | tr7zw |
| api | Add last tick time API | Ivan Pekov | tr7zw |
| server | Add no-tick block list | William Blake Galbreath | |
| server | Add nspt command | Ivan Pekov | |
| server | Add option to disable dolphin treasure searching | William Blake Galbreath | |
@ -85,8 +85,8 @@ This is an overview over all patches that are currently used.
| server | MC-147659 - Fix non black cats spawning in swamp huts | William Blake Galbreath | |
| server | MC-168772 Fix - Add turtle egg block options | William Blake Galbreath | |
| server | Make lava flow speed configurable | William Blake Galbreath | |
| api | Modify POM | YatopiaMC | |
| server | Modify POM | YatopiaMC | |
| api | Modify POM | YatopiaMC | |
| server | Modify default configs | tr7zw | |
| server | Nuke streams off BlockPosition | Ivan Pekov | |
| server | Nuke streams off SectionPosition | Ivan Pekov | |
@ -107,10 +107,10 @@ This is an overview over all patches that are currently used.
| server | PaperPR - Fix username connecting with no texture being | Camotoy | |
| server | Per entity (type) collision settings | MrIvanPlays | tr7zw |
| server | Persistent TileEntity Lore and DisplayName | jmp | |
| api | PlayerAttackEntityEvent | Ivan Pekov | |
| server | PlayerAttackEntityEvent | Ivan Pekov | |
| api | ProxyForwardDataEvent | Ivan Pekov | |
| api | PlayerAttackEntityEvent | Ivan Pekov | |
| server | ProxyForwardDataEvent | Ivan Pekov | |
| api | ProxyForwardDataEvent | Ivan Pekov | |
| server | Purpur config files | William Blake Galbreath | |
| server | Redirect Configs | tr7zw | |
| server | Reduce projectile chunk loading | Paul Sauve | |
@ -138,6 +138,7 @@ This is an overview over all patches that are currently used.
| api | Yatopia API Bundle | YatopiaMC | |
| server | Yatopia configuration | tr7zw | |
| server | Yatopia-Server-Fixes | YatopiaMC | |
| server | add config for logging login location | Simon Gardling | |
| server | dont load chunks for physics | Aikar | |
| server | lithium DataTrackerMixin | JellySquid | tr7zw |
| server | lithium HashedList | JellySquid | |

View File

@ -0,0 +1,40 @@
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/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 5afc424481106570b84a9b38c94fe397f1aff636..0efbc7e156549f397c6ed53671d247e1e2edf9d5 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -395,7 +395,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 00c600d74ba84cb564b9b22f53f279a93839d71f..35f212c2ac43ebea6ce9c4a333738c7a869ebc18 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -297,4 +297,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);
+ }
+
}