From b98c1326f0fce49734f88c6ccf1aa55dc0431aa7 Mon Sep 17 00:00:00 2001 From: Memencio Date: Thu, 7 Nov 2024 00:37:15 -0400 Subject: [PATCH] misc: little code cleanup --- .../unsignedvelocity/UnSignedVelocity.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/main/java/io/github/_4drian3d/unsignedvelocity/UnSignedVelocity.java b/src/main/java/io/github/_4drian3d/unsignedvelocity/UnSignedVelocity.java index f493bf1..7b51f94 100644 --- a/src/main/java/io/github/_4drian3d/unsignedvelocity/UnSignedVelocity.java +++ b/src/main/java/io/github/_4drian3d/unsignedvelocity/UnSignedVelocity.java @@ -105,7 +105,7 @@ public void onProxyInitialize(ProxyInitializeEvent event) { } public void setupConfiguration() throws IOException { - this.configuration = Configuration.loadConfig(dataDirectory); + configuration = Configuration.loadConfig(dataDirectory); } private void forciblyDisableForceKeyAuthentication() throws NoSuchFieldException, IllegalAccessException { @@ -125,11 +125,11 @@ private void forciblyDisableForceKeyAuthentication() throws NoSuchFieldException } public void setupConfigurablePacketListeners() { - if (this.packetListeners != null && !this.packetListeners.isEmpty()) { + if (packetListeners != null && !packetListeners.isEmpty()) { packetListeners.forEach(ConfigurablePacketListener::unregister); } - List packetListeners = Stream.of( + List loadablePacketListeners = Stream.of( LoginListener.class, CommandListener.class, ClientChatListener.class, @@ -143,7 +143,7 @@ public void setupConfigurablePacketListeners() { .toList(); packetListeners.forEach(ConfigurablePacketListener::register); - this.packetListeners = packetListeners; + packetListeners = loadablePacketListeners; } public List getPluginStatusMessages() { @@ -160,12 +160,4 @@ public List getPluginStatusMessages() { "<#6892bd>Secure Chat Data: " + configuration.sendSecureChatData() + " | <#6892bd>Safe Server Status: " + configuration.sendSafeServerStatus()) ); } - - public ProxyServer getServer() { - return server; - } - - public Configuration getConfiguration() { - return configuration; - } } \ No newline at end of file