Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-25 15:50:14 +01:00
Fix reload command (fixes #2255)
Dieser Commit ist enthalten in:
Ursprung
aec27f8481
Commit
b2ebfc6803
@ -391,7 +391,9 @@ public class GeyserConnector {
|
|||||||
|
|
||||||
generalThreadPool.shutdown();
|
generalThreadPool.shutdown();
|
||||||
bedrockServer.close();
|
bedrockServer.close();
|
||||||
timeSyncer.shutdown();
|
if (timeSyncer != null) {
|
||||||
|
timeSyncer.shutdown();
|
||||||
|
}
|
||||||
newsHandler.shutdown();
|
newsHandler.shutdown();
|
||||||
players.clear();
|
players.clear();
|
||||||
defaultAuthType = null;
|
defaultAuthType = null;
|
||||||
|
@ -32,6 +32,8 @@ import org.geysermc.connector.command.GeyserCommand;
|
|||||||
import org.geysermc.connector.network.session.GeyserSession;
|
import org.geysermc.connector.network.session.GeyserSession;
|
||||||
import org.geysermc.connector.utils.LanguageUtils;
|
import org.geysermc.connector.utils.LanguageUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class ReloadCommand extends GeyserCommand {
|
public class ReloadCommand extends GeyserCommand {
|
||||||
|
|
||||||
private final GeyserConnector connector;
|
private final GeyserConnector connector;
|
||||||
@ -51,8 +53,8 @@ public class ReloadCommand extends GeyserCommand {
|
|||||||
|
|
||||||
sender.sendMessage(message);
|
sender.sendMessage(message);
|
||||||
|
|
||||||
for (GeyserSession otherSession : connector.getPlayers()) {
|
for (GeyserSession otherSession : new ArrayList<>(connector.getPlayers())) {
|
||||||
otherSession.disconnect(LanguageUtils.getPlayerLocaleString("geyser.commands.reload.kick", session.getLocale()));
|
otherSession.disconnect(LanguageUtils.getPlayerLocaleString("geyser.commands.reload.kick", otherSession.getLocale()));
|
||||||
}
|
}
|
||||||
connector.reload();
|
connector.reload();
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren