Skip to content

Commit

Permalink
Add ability to get Command.Parameterized from CommandContext (#2217)
Browse files Browse the repository at this point in the history
  • Loading branch information
dualspiral committed Sep 12, 2020
1 parent 2839418 commit 3564dfb
Showing 1 changed file with 9 additions and 0 deletions.
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

0 comments on commit 3564dfb

Please sign in to comment.