aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hype/bbsentials/communication
diff options
context:
space:
mode:
authorHacktheTime <l4bg0jb7@duck.com>2023-10-07 19:17:54 +0200
committerHacktheTime <l4bg0jb7@duck.com>2023-10-07 19:17:54 +0200
commitd4ada83ec3e7416bbac10c7d79a9ac5a0f939de6 (patch)
tree0fb304199d99c4f6da7522fcc537446506fdeca3 /src/main/java/de/hype/bbsentials/communication
parent2b2b36dbadf2eb75809f9a53e2a2c0b87c85508a (diff)
downloadBBsentials-d4ada83ec3e7416bbac10c7d79a9ac5a0f939de6.tar.gz
BBsentials-d4ada83ec3e7416bbac10c7d79a9ac5a0f939de6.tar.bz2
BBsentials-d4ada83ec3e7416bbac10c7d79a9ac5a0f939de6.zip
bug fixes and performance improvements.
Diffstat (limited to 'src/main/java/de/hype/bbsentials/communication')
-rw-r--r--src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java11
1 files changed, 8 insertions, 3 deletions
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) {