diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java | 2 | ||||
-rw-r--r-- | src/main/java/de/hype/bbsentials/packets/packets/DisconnectPacket.java | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java index 1d1e3c1..0d43bd9 100644 --- a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java +++ b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java @@ -422,7 +422,7 @@ public class BBsentialConnection { else { BBsentials.conditionalReconnectToBBserver(); } - }, (long) (packet.waitBeforeReconnect[i] + (Math.random() * packet.random)), TimeUnit.SECONDS); + }, (long) (packet.waitBeforeReconnect[i] + (Math.random() * packet.randomExtraDelay)), TimeUnit.SECONDS); } } diff --git a/src/main/java/de/hype/bbsentials/packets/packets/DisconnectPacket.java b/src/main/java/de/hype/bbsentials/packets/packets/DisconnectPacket.java index ab04d1a..7cb461e 100644 --- a/src/main/java/de/hype/bbsentials/packets/packets/DisconnectPacket.java +++ b/src/main/java/de/hype/bbsentials/packets/packets/DisconnectPacket.java @@ -5,16 +5,18 @@ import de.hype.bbsentials.constants.enviromentShared.InternalReasonConstants; public class DisconnectPacket extends AbstractPacket { - public DisconnectPacket(InternalReasonConstants internalReason, int[] waitBeforeReconnect, String displayReason, String displayMessage) { + public DisconnectPacket(InternalReasonConstants internalReason, int[] waitBeforeReconnect, int randomExtraDelay, String displayReason, String displayMessage) { super(1, 1); //Min and Max supportet Version this.internalReason = internalReason; this.waitBeforeReconnect = waitBeforeReconnect; this.displayReason = displayReason; this.displayMessage = displayMessage; + this.randomExtraDelay = randomExtraDelay; } public final InternalReasonConstants internalReason; public final int[] waitBeforeReconnect; + public final int randomExtraDelay; public final String displayReason; public final String displayMessage; |