From 42c23e452194ae270c076443b3cb333093fe309b Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 18 Feb 2023 11:04:29 +0100 Subject: [PATCH] Add exception log --- .../bungeecore/listeners/NonFabricFabricCheck.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/de/steamwar/bungeecore/listeners/NonFabricFabricCheck.java b/src/de/steamwar/bungeecore/listeners/NonFabricFabricCheck.java index b903b9c2..2a1fd2b0 100644 --- a/src/de/steamwar/bungeecore/listeners/NonFabricFabricCheck.java +++ b/src/de/steamwar/bungeecore/listeners/NonFabricFabricCheck.java @@ -22,6 +22,8 @@ package de.steamwar.bungeecore.listeners; import de.steamwar.bungeecore.BungeeCore; import de.steamwar.bungeecore.Message; import de.steamwar.bungeecore.Storage; +import de.steamwar.bungeecore.sql.SWException; +import de.steamwar.bungeecore.sql.SteamwarUser; import net.md_5.bungee.BungeeCord; import net.md_5.bungee.api.connection.Connection; import net.md_5.bungee.api.connection.ProxiedPlayer; @@ -80,7 +82,12 @@ public class NonFabricFabricCheck extends BasicListener { @EventHandler public void onPlayerDisconnect(PlayerDisconnectEvent e) { if (checking.remove(e.getPlayer())) { + logMessage(SteamwarUser.get(e.getPlayer().getUniqueId()), "Player is potentially using rebranded Fabric"); usingFabric.add(e.getPlayer().getUniqueId()); } } + + public void logMessage(SteamwarUser user, String reason) { + SWException.log("Bungee", "NonFabricFabricCheck " + user.getUserName() + ": " + reason, ""); + } }