forked from SteamWar/SteamWar
Improve error handling and logging in Techhider and TinyProtocol
Refined logging messages for clarity by replacing "Techhider" with "PacketInterceptor" where appropriate. Adjusted error handling in `TechhiderbugCommand` by removing redundant `flush` calls and properly logging exceptions during bug report generation. These changes aim to enhance maintainability and debugging.
This commit is contained in:
@@ -95,7 +95,7 @@ public class TinyProtocol implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onPlayerLogin(PlayerLoginEvent e) {
|
||||
plugin.getLogger().info("Creating Techhider for: " + e.getPlayer().getName() + " (" + closed + ")");
|
||||
plugin.getLogger().info("Creating PacketInterceptor for: " + e.getPlayer().getName() + " (" + closed + ")");
|
||||
if(closed)
|
||||
return;
|
||||
new PacketInterceptor(e.getPlayer());
|
||||
@@ -130,7 +130,7 @@ public class TinyProtocol implements Listener {
|
||||
}
|
||||
|
||||
public final void close() {
|
||||
plugin.getLogger().log(Level.INFO, "Closing Techhider", new Exception("Stacktrace"));
|
||||
plugin.getLogger().log(Level.INFO, "Closing PacketInterceptor", new Exception("Stacktrace"));
|
||||
|
||||
if(closed)
|
||||
return;
|
||||
@@ -169,9 +169,9 @@ public class TinyProtocol implements Listener {
|
||||
return;
|
||||
|
||||
synchronized (playerInterceptors) {
|
||||
plugin.getLogger().info("Adding Techhider for: " + player.getName());
|
||||
playerInterceptors.put(player, this);
|
||||
}
|
||||
plugin.getLogger().info("Adding Techhider for: " + player.getName());
|
||||
|
||||
try {
|
||||
channel.pipeline().addBefore("packet_handler", HANDLER_NAME, this);
|
||||
|
||||
Reference in New Issue
Block a user