From 975eb22afd65cf6858fb80b1ed853836c2b6738f Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Feb 2019 14:36:14 -0500 Subject: [PATCH] add more test scenarios --- .../co/aikar/acfexample/SomeOtherCommand.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/example/src/main/java/co/aikar/acfexample/SomeOtherCommand.java b/example/src/main/java/co/aikar/acfexample/SomeOtherCommand.java index 24916393..56d93bdb 100644 --- a/example/src/main/java/co/aikar/acfexample/SomeOtherCommand.java +++ b/example/src/main/java/co/aikar/acfexample/SomeOtherCommand.java @@ -1,12 +1,32 @@ package co.aikar.acfexample; import co.aikar.commands.BaseCommand; +import co.aikar.commands.annotation.CatchUnknown; import co.aikar.commands.annotation.CommandAlias; import co.aikar.commands.annotation.Default; +import co.aikar.commands.annotation.Single; +import co.aikar.commands.annotation.Subcommand; +import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @CommandAlias("soctest") public class SomeOtherCommand extends BaseCommand { + + @Subcommand("foo") + public void onFoo1(Player player) { + player.sendMessage("you foo'd"); + } + + @Subcommand("foo") + public void onFoo2(CommandSender sender, @Single String foo) { + sender.sendMessage("You foo'd with " + foo); + } + + @CatchUnknown + public void onUnknown(CommandSender sender) { + sender.sendMessage("UNKNOWN!"); + } + @Default public void test(Player player, String string, @Default("1") int integer) { player.sendMessage("Hi " + string + " - " + integer);