mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
Register CommandIssuer context
This commit is contained in:
Generated
+11
@@ -33,4 +33,15 @@
|
||||
<module name="example-plugin" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
<module name="acf-bukkit" options="-parameters" />
|
||||
<module name="acf-bungee" options="-parameters" />
|
||||
<module name="acf-core" options="-parameters" />
|
||||
<module name="acf-jda" options="-parameters" />
|
||||
<module name="acf-paper" options="-parameters" />
|
||||
<module name="acf-parent" options="-parameters" />
|
||||
<module name="acf-sponge" options="-parameters" />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
@@ -45,6 +45,7 @@ public class CommandContexts<R extends CommandExecutionContext<?, ? extends Comm
|
||||
|
||||
CommandContexts(CommandManager manager) {
|
||||
this.manager = manager;
|
||||
registerContext(CommandIssuer.class, c -> c.getIssuer());
|
||||
registerContext(Short.class, (c) -> {
|
||||
try {
|
||||
return parseAndValidateNumber(c, Short.MIN_VALUE, Short.MAX_VALUE).shortValue();
|
||||
|
||||
Reference in New Issue
Block a user