46 lines
2.3 KiB
Diff
46 lines
2.3 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
|
|
|
|
Original code by YatopiaMC, licensed under MIT
|
|
You can find the original code on https://github.com/YatopiaMC/Yatopia
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
index 7a0c1ba40156df69bbbf36d96bed0950130d2351..133286cae44d984c5cd91302b94b9bfa9a32401d 100644
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
@@ -487,7 +487,13 @@ public abstract class PlayerList {
|
|
}
|
|
// Paper end
|
|
// CraftBukkit - Moved from above, added world
|
|
- PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
|
|
+ // Yatopia start - configurable logging of player login location
|
|
+ if (wtf.etil.mirai.MiraiConfig.logPlayerLoginLoc) {
|
|
+ PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
|
|
+ } else {
|
|
+ PlayerList.LOGGER.info("{}[{}] logged in with entity id {}", player.getName().getString(), s1, player.getId());
|
|
+ }
|
|
+ // Yatopia end - configurable logging of player login location
|
|
}
|
|
|
|
public void updateEntireScoreboard(ServerScoreboard scoreboard, ServerPlayer player) {
|
|
diff --git a/src/main/java/wtf/etil/mirai/MiraiConfig.java b/src/main/java/wtf/etil/mirai/MiraiConfig.java
|
|
index 5b30b329959811f99f13f32166574f90e765bcb1..63d750d5858d20304b9608697ae618eb97cb6eb6 100644
|
|
--- a/src/main/java/wtf/etil/mirai/MiraiConfig.java
|
|
+++ b/src/main/java/wtf/etil/mirai/MiraiConfig.java
|
|
@@ -184,6 +184,11 @@ public class MiraiConfig {
|
|
|
|
// Mirai - settings below
|
|
|
|
-
|
|
+ public static boolean logPlayerLoginLoc = true;
|
|
+ private static void logPlayerLoc() {
|
|
+ logPlayerLoginLoc = getBoolean("log-player-login-location", logPlayerLoginLoc);
|
|
+ }
|
|
+
|
|
+
|
|
|
|
}
|
|
\ No newline at end of file
|