aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/hype/bbsentials/client/SplashStatusUpdateListener.java8
-rw-r--r--src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java3
2 files changed, 4 insertions, 7 deletions
diff --git a/src/main/java/de/hype/bbsentials/client/SplashStatusUpdateListener.java b/src/main/java/de/hype/bbsentials/client/SplashStatusUpdateListener.java
index 6b5180a..2463c79 100644
--- a/src/main/java/de/hype/bbsentials/client/SplashStatusUpdateListener.java
+++ b/src/main/java/de/hype/bbsentials/client/SplashStatusUpdateListener.java
@@ -25,9 +25,8 @@ public class SplashStatusUpdateListener implements Runnable {
@Override
public void run() {
BBsentials.splashLobby = true;
+ int maxPlayerCount = BBUtils.getMaximumPlayerCount() - 5;
while (BBsentials.splashLobby) {
- int maxPlayerCount = BBUtils.getMaximumPlayerCount() - 5;
- while (splashLobby && !(status.equals(SplashUpdatePacket.STATUS_DONE) || status.equals(SplashUpdatePacket.STATUS_CANCELED))) {
if (!full&&(BBUtils.getPlayerCount() >= maxPlayerCount)) {
newStatus = SplashUpdatePacket.STATUS_FULL;
full=true;
@@ -36,10 +35,9 @@ public class SplashStatusUpdateListener implements Runnable {
status = newStatus;
connection.sendPacket(new SplashUpdatePacket(packet.splashId, status));
}
- }
try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
+ Thread.sleep(250);
+ } catch (InterruptedException ignored) {
}
}
if (splashed) {
diff --git a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java
index abb5265..e6e5096 100644
--- a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java
+++ b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java
@@ -344,11 +344,10 @@ public class BBsentialConnection {
public void onSplashNotifyPacket(SplashNotifyPacket packet) {
int waitTime;
-
if (packet.splasherUsername.equals(config.getUsername())) {
SplashStatusUpdateListener splashStatusUpdateListener = new SplashStatusUpdateListener(this, packet);
BBsentials.splashStatusUpdateListener = splashStatusUpdateListener;
- executionService.submit(splashStatusUpdateListener);
+ executionService.execute(splashStatusUpdateListener);
}
else {
SplashManager.addSplash(packet);