diff options
-rw-r--r-- | src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java | 24 | ||||
-rw-r--r-- | src/main/resources/fabric.mod.json | 16 |
2 files changed, 18 insertions, 22 deletions
diff --git a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java index 68ce520..d458724 100644 --- a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java +++ b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java @@ -1,8 +1,8 @@ package de.hype.bbsentials.communication; import de.hype.bbsentials.chat.Chat; -import de.hype.bbsentials.client.BBUtils; import de.hype.bbsentials.client.BBsentials; +import de.hype.bbsentials.client.SplashStatusUpdateListener; import de.hype.bbsentials.constants.enviromentShared.*; import de.hype.bbsentials.packets.AbstractPacket; import de.hype.bbsentials.packets.PacketManager; @@ -34,7 +34,7 @@ import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; import static de.hype.bbsentials.client.BBsentials.config; -import static de.hype.bbsentials.client.BBsentials.splashLobby; +import static de.hype.bbsentials.client.BBsentials.executionService; public class BBsentialConnection { private Socket socket; @@ -347,23 +347,9 @@ public class BBsentialConnection { int waitTime; if (packet.splasherUsername.equals(config.getUsername())) { - BBsentials.splashLobby = true; - String status = SplashUpdatePacket.STATUS_WAITING; - String newStatus = SplashUpdatePacket.STATUS_WAITING; - int maxPlayerCount = BBUtils.getMaximumPlayerCount() - 5; - while (splashLobby && !status.equals(SplashUpdatePacket.STATUS_DONE)) { - if (BBUtils.getPlayerCount() >= maxPlayerCount) { - newStatus = SplashUpdatePacket.STATUS_FULL; - } - if (!status.equals(newStatus)) { - status = newStatus; - sendPacket(new SplashUpdatePacket(packet.splashId, status)); - } - } - if (!status.equals(newStatus)) { - status = newStatus; - sendPacket(new SplashUpdatePacket(packet.splashId, status)); - } + SplashStatusUpdateListener splashStatusUpdateListener = new SplashStatusUpdateListener(this,packet); + BBsentials.splashStatusUpdateListener = splashStatusUpdateListener; + executionService.submit(splashStatusUpdateListener); } else { if (packet.lessWaste) { diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index bc1b4c3..1a25af1 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -11,9 +11,10 @@ "contact": { "homepage": "https://github.com/HacktheTime/BBsentials1.20", "issues": "https://github.com/HacktheTime/BBsentials1.20/issues", - "discord": "discord.gg" + "email": "s0844x76@duck.com", + "sources": "https://github.com/HacktheTime/BBsentials1.20" }, - "license": "All-Rights-Reserved", + "license": "Look on Github (Sources). a Modified \"CC BY-NC-ND 4.0\" License", "environment": "client", "entrypoints": { "client": [ @@ -28,5 +29,14 @@ }, "mixins": [ "bbsentials.mixins.json" - ] + ], + "custom": { + "modmenu": { + "links": { + "License": "https://github.com/HacktheTime/BBsentials1.20/blob/master/LICENSE", + "modmenu.discord":"discord.gg/qr5mPRq8uG" + }, + "update_checker": true + } + } }
\ No newline at end of file |