3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-20 06:50:09 +01:00

Register /geyser stop only on standalone (#2569)

We don't want to condone stopping Geyser in the middle of a plugin session, especially when there's no way to start it back up again.
Dieser Commit ist enthalten in:
Jens Collaert 2021-10-13 19:09:19 +02:00 committet von GitHub
Ursprung 52ef3d392a
Commit 7454033277
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
3 geänderte Dateien mit 5 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -22,8 +22,6 @@ permissions:
description: Puts an items in your offhand. description: Puts an items in your offhand.
geyser.command.reload: geyser.command.reload:
description: Reloads the Geyser configurations. Kicks all players when used! description: Reloads the Geyser configurations. Kicks all players when used!
geyser.command.shutdown:
description: Shuts down Geyser.
geyser.command.statistics: geyser.command.statistics:
description: Shows the statistics of the player on the server. description: Shows the statistics of the player on the server.
geyser.command.version: geyser.command.version:

Datei anzeigen

@ -27,6 +27,7 @@ package org.geysermc.connector.command;
import lombok.Getter; import lombok.Getter;
import org.geysermc.common.PlatformType;
import org.geysermc.connector.GeyserConnector; import org.geysermc.connector.GeyserConnector;
import org.geysermc.connector.command.defaults.*; import org.geysermc.connector.command.defaults.*;
import org.geysermc.connector.network.session.GeyserSession; import org.geysermc.connector.network.session.GeyserSession;
@ -47,13 +48,15 @@ public abstract class CommandManager {
registerCommand(new HelpCommand(connector, "help", "geyser.commands.help.desc", "geyser.command.help")); registerCommand(new HelpCommand(connector, "help", "geyser.commands.help.desc", "geyser.command.help"));
registerCommand(new ListCommand(connector, "list", "geyser.commands.list.desc", "geyser.command.list")); registerCommand(new ListCommand(connector, "list", "geyser.commands.list.desc", "geyser.command.list"));
registerCommand(new ReloadCommand(connector, "reload", "geyser.commands.reload.desc", "geyser.command.reload")); registerCommand(new ReloadCommand(connector, "reload", "geyser.commands.reload.desc", "geyser.command.reload"));
registerCommand(new StopCommand(connector, "stop", "geyser.commands.stop.desc", "geyser.command.stop"));
registerCommand(new OffhandCommand(connector, "offhand", "geyser.commands.offhand.desc", "geyser.command.offhand")); registerCommand(new OffhandCommand(connector, "offhand", "geyser.commands.offhand.desc", "geyser.command.offhand"));
registerCommand(new DumpCommand(connector, "dump", "geyser.commands.dump.desc", "geyser.command.dump")); registerCommand(new DumpCommand(connector, "dump", "geyser.commands.dump.desc", "geyser.command.dump"));
registerCommand(new VersionCommand(connector, "version", "geyser.commands.version.desc", "geyser.command.version")); registerCommand(new VersionCommand(connector, "version", "geyser.commands.version.desc", "geyser.command.version"));
registerCommand(new SettingsCommand(connector, "settings", "geyser.commands.settings.desc", "geyser.command.settings")); registerCommand(new SettingsCommand(connector, "settings", "geyser.commands.settings.desc", "geyser.command.settings"));
registerCommand(new StatisticsCommand(connector, "statistics", "geyser.commands.statistics.desc", "geyser.command.statistics")); registerCommand(new StatisticsCommand(connector, "statistics", "geyser.commands.statistics.desc", "geyser.command.statistics"));
registerCommand(new AdvancementsCommand("advancements", "geyser.commands.advancements.desc", "geyser.command.advancements")); registerCommand(new AdvancementsCommand("advancements", "geyser.commands.advancements.desc", "geyser.command.advancements"));
if (GeyserConnector.getInstance().getPlatformType() == PlatformType.STANDALONE) {
registerCommand(new StopCommand(connector, "stop", "geyser.commands.stop.desc", "geyser.command.stop"));
}
} }
public void registerCommand(GeyserCommand command) { public void registerCommand(GeyserCommand command) {

Datei anzeigen

@ -54,4 +54,4 @@ public class StopCommand extends GeyserCommand {
connector.getBootstrap().onDisable(); connector.getBootstrap().onDisable();
} }
} }