Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 00:00:41 +01:00
Add exception handling to the scoreboard updater
Dieser Commit ist enthalten in:
Ursprung
1316f6e1da
Commit
c115afba85
@ -62,6 +62,7 @@ public final class ScoreboardUpdater extends Thread {
|
||||
@Override
|
||||
public void run() {
|
||||
while (!connector.isShuttingDown()) {
|
||||
try {
|
||||
long timeTillAction = getTimeTillNextAction();
|
||||
if (timeTillAction > 0) {
|
||||
sleepFor(timeTillAction);
|
||||
@ -138,6 +139,11 @@ public final class ScoreboardUpdater extends Thread {
|
||||
|
||||
long timeTillNextAction = getTimeTillNextAction();
|
||||
sleepFor(timeTillNextAction);
|
||||
} catch (Throwable e) {
|
||||
connector.getLogger().error("Error while translating scoreboard information!", e);
|
||||
// Wait so we don't try to run the scoreboard immediately after this
|
||||
sleepFor(FIRST_MILLIS_BETWEEN_UPDATES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren