From d4ada83ec3e7416bbac10c7d79a9ac5a0f939de6 Mon Sep 17 00:00:00 2001 From: HacktheTime Date: Sat, 7 Oct 2023 19:17:54 +0200 Subject: bug fixes and performance improvements. --- .../de/hype/bbsentials/communication/BBsentialConnection.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/main/java/de/hype/bbsentials/communication') diff --git a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java index 0d43bd9..49353be 100644 --- a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java +++ b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java @@ -259,7 +259,7 @@ public class BBsentialConnection { } catch (InterruptedException e) { throw new RuntimeException(e); } - sendPacket(new RequestConnectPacket(MinecraftClient.getInstance().player.getUuid().toString().replace("-", ""), BBsentials.getConfig().getApiKey(), BBsentials.getConfig().getApiVersion(), AuthenticationConstants.DATABASE)); + sendPacket(new RequestConnectPacket(config.getMCUUID(), BBsentials.getConfig().getApiKey(), BBsentials.getConfig().getApiVersion(), AuthenticationConstants.DATABASE)); } } else { @@ -314,7 +314,7 @@ public class BBsentialConnection { public void onSplashNotifyPacket(SplashNotifyPacket packet) { int waitTime; - if (packet.splasherUsername.equals(config.getUsername())) { + if (packet.splasherUsername.equals(config.getUsername())&&config.autoSplashStatusUpdates) { Chat.sendPrivateMessageToSelfInfo("The Splash Update Statuses will be updatet automatically for you. If you need to do something manually go into Discord Splash Dashboard"); SplashStatusUpdateListener splashStatusUpdateListener = new SplashStatusUpdateListener(this, packet); BBsentials.splashStatusUpdateListener = splashStatusUpdateListener; @@ -491,7 +491,12 @@ public class BBsentialConnection { } public void onPartyPacket(PartyPacket packet) { - Chat.sendCommand("/p " + packet.type + String.join(" ", packet.users)); + if (config.allowServerPartyInvite) { + Chat.sendCommand("/p " + packet.type + String.join(" ", packet.users)); + } + else { + Chat.sendPrivateMessageToSelfImportantInfo("Blocked a Party Command from the Server: "+packet.type+" : "+String.join(" ", packet.users)); + } } public void onSystemMessagePacket(SystemMessagePacket packet) { -- cgit