mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix reload command (fixes #2255)
This commit is contained in:
parent
aec27f8481
commit
b2ebfc6803
2 changed files with 7 additions and 3 deletions
|
@ -391,7 +391,9 @@ public class GeyserConnector {
|
|||
|
||||
generalThreadPool.shutdown();
|
||||
bedrockServer.close();
|
||||
timeSyncer.shutdown();
|
||||
if (timeSyncer != null) {
|
||||
timeSyncer.shutdown();
|
||||
}
|
||||
newsHandler.shutdown();
|
||||
players.clear();
|
||||
defaultAuthType = null;
|
||||
|
|
|
@ -32,6 +32,8 @@ import org.geysermc.connector.command.GeyserCommand;
|
|||
import org.geysermc.connector.network.session.GeyserSession;
|
||||
import org.geysermc.connector.utils.LanguageUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ReloadCommand extends GeyserCommand {
|
||||
|
||||
private final GeyserConnector connector;
|
||||
|
@ -51,8 +53,8 @@ public class ReloadCommand extends GeyserCommand {
|
|||
|
||||
sender.sendMessage(message);
|
||||
|
||||
for (GeyserSession otherSession : connector.getPlayers()) {
|
||||
otherSession.disconnect(LanguageUtils.getPlayerLocaleString("geyser.commands.reload.kick", session.getLocale()));
|
||||
for (GeyserSession otherSession : new ArrayList<>(connector.getPlayers())) {
|
||||
otherSession.disconnect(LanguageUtils.getPlayerLocaleString("geyser.commands.reload.kick", otherSession.getLocale()));
|
||||
}
|
||||
connector.reload();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue