Register CommandIssuer context

This commit is contained in:
Aikar
2018-08-19 10:26:20 -04:00
parent 0aa4cfd457
commit 6c7ccbd6da
2 changed files with 12 additions and 0 deletions
+11
View File
@@ -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();