mirror of
https://github.com/aikar/commands.git
synced 2026-06-14 20:00:37 +00:00
Refactor how parameter annotations are parsed to prep for processors
this also will improve performance, as we will only do flag parsing and replacements once on register instead of every execution for some things.
This commit is contained in:
@@ -32,7 +32,7 @@ import java.util.Map;
|
||||
|
||||
public class SpongeCommandExecutionContext extends CommandExecutionContext<SpongeCommandExecutionContext, SpongeCommandIssuer> {
|
||||
|
||||
SpongeCommandExecutionContext(RegisteredCommand cmd, Parameter param, SpongeCommandIssuer sender, List<String> args,
|
||||
SpongeCommandExecutionContext(RegisteredCommand cmd, CommandParameter param, SpongeCommandIssuer sender, List<String> args,
|
||||
int index, Map<String, Object> passedArgs) {
|
||||
super(cmd, param, sender, args, index, passedArgs);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ import org.spongepowered.api.text.format.TextColor;
|
||||
import org.spongepowered.api.text.format.TextColors;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Parameter;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -146,7 +145,7 @@ public class SpongeCommandManager extends CommandManager<
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpongeCommandExecutionContext createCommandContext(RegisteredCommand command, Parameter parameter, CommandIssuer sender, List<String> args, int i, Map<String, Object> passedArgs) {
|
||||
public SpongeCommandExecutionContext createCommandContext(RegisteredCommand command, CommandParameter parameter, CommandIssuer sender, List<String> args, int i, Map<String, Object> passedArgs) {
|
||||
return new SpongeCommandExecutionContext(command, parameter, (SpongeCommandIssuer) sender, args, i, passedArgs);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user