Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Shanwer committed Oct 13, 2024
2 parents 7281412 + d64c0b3 commit d6d2da4
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
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;
Expand Down Expand Up @@ -193,11 +194,17 @@ public void register(CommandManager<GeyserCommandSource> manager) {
.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) {
GeyserCommandSource source = context.sender();
String[] args = context.getOrDefault("args", "").split(" ");
String[] args = context.getOrDefault("args", " ").split(" ");

if (sourceType.isInstance(source)) {
executor.execute((T) source, this, args);
Expand Down

0 comments on commit d6d2da4

Please sign in to comment.