mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
committed by
Daniel Ennis
parent
786ebe831f
commit
3c979a9ef2
@@ -27,9 +27,10 @@ import co.aikar.commands.BukkitCommandManager;
|
||||
import co.aikar.commands.ConditionFailedException;
|
||||
import co.aikar.commands.MessageKeys;
|
||||
import co.aikar.commands.MessageType;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public final class ACFExample extends JavaPlugin {
|
||||
|
||||
private static ACFExample plugin;
|
||||
@@ -64,9 +65,9 @@ public final class ACFExample extends JavaPlugin {
|
||||
SomeObject.getContextResolver());
|
||||
|
||||
// 4: Register Command Completions - this will be accessible with @CommandCompletion("@test")
|
||||
commandManager.getCommandCompletions().registerAsyncCompletion("test", c -> (
|
||||
Lists.newArrayList("foo", "bar", "baz")
|
||||
));
|
||||
commandManager.getCommandCompletions().registerAsyncCompletion("test", c -> {
|
||||
Arrays.asList("foo", "bar", "baz")
|
||||
});
|
||||
|
||||
// 5: Register Command Conditions
|
||||
commandManager.getCommandConditions().addCondition(SomeObject.class, "limits", (c, exec, value) -> {
|
||||
|
||||
Reference in New Issue
Block a user