3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-26 08:10:11 +01:00

Fix: Extension command arg parsing (#5081)

* Fix: No args being parsed as 1 arg, and don't try to localize extension command's descriptions

* add comment
Dieser Commit ist enthalten in:
chris 2024-10-13 01:12:58 +08:00 committet von GitHub
Ursprung 50de9d6867
Commit d64c0b38da
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -38,6 +38,7 @@ import org.geysermc.geyser.command.GeyserCommandSource;
import org.geysermc.geyser.session.GeyserSession;
import org.incendo.cloud.CommandManager;
import org.incendo.cloud.context.CommandContext;
import org.incendo.cloud.description.CommandDescription;
import java.util.ArrayList;
import java.util.List;
@ -193,6 +194,12 @@ public abstract class GeyserExtensionCommand extends GeyserCommand {
.handler(this::execute));
}
@Override
protected org.incendo.cloud.Command.Builder.Applicable<GeyserCommandSource> meta() {
// We don't want to localize the extension command description
return builder -> builder.commandDescription(CommandDescription.commandDescription(description));
}
@SuppressWarnings("unchecked")
@Override
public void execute(CommandContext<GeyserCommandSource> context) {