Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to get Command.Parameterized from CommandContext (#2217) #2227

Merged
merged 1 commit into from
Sep 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import net.kyori.adventure.audience.Audience;
import net.kyori.adventure.text.Component;
import org.spongepowered.api.command.Command;
import org.spongepowered.api.command.CommandCause;
import org.spongepowered.api.command.parameter.managed.Flag;
import org.spongepowered.api.service.permission.SubjectProxy;
Expand All @@ -47,6 +48,14 @@
*/
public interface CommandContext extends SubjectProxy {

/**
* Gets the {@link Command.Parameterized} that is being executed, if it
* exists.
*
* @return The {@link Command.Parameterized}.
*/
Optional<Command.Parameterized> getExecutedCommand();

/**
* Gets the {@link CommandCause} associated with this context.
*
Expand Down