12 | * Using this on a User/Member will fetch the author and otherwise it'll parse the input. 13 | *
14 | */ 15 | @Target(ElementType.PARAMETER) 16 | @Retention(RetentionPolicy.RUNTIME) 17 | public @interface Author { 18 | } 19 | -------------------------------------------------------------------------------- /sponge/src/main/java/co/aikar/commands/SpongeLocales.java: -------------------------------------------------------------------------------- 1 | package co.aikar.commands; 2 | 3 | public class SpongeLocales extends Locales{ 4 | private final SpongeCommandManager manager; 5 | 6 | public SpongeLocales(SpongeCommandManager manager) { 7 | super(manager); 8 | this.manager = manager; 9 | this.addBundleClassLoader(this.manager.getPlugin().getClass().getClassLoader()); 10 | } 11 | 12 | @Override 13 | public void loadLanguages() { 14 | super.loadLanguages(); 15 | String pluginName = "acf-" + manager.plugin.getName(); 16 | addMessageBundles("acf-minecraft", pluginName, pluginName.toLowerCase()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 |11 | * If a supported parameter is marked with the CrossGuild annotation, the parameter will be filled from 12 | * a global perspective (i.e., all of the guilds the bot is connected to). Otherwise, the parameter will 13 | * be filled from command input. 14 | *
15 | */ 16 | @Target(ElementType.PARAMETER) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | public @interface CrossGuild { 19 | } 20 | -------------------------------------------------------------------------------- /jda/src/main/java/co/aikar/commands/JDAListener.java: -------------------------------------------------------------------------------- 1 | package co.aikar.commands; 2 | 3 | import net.dv8tion.jda.core.entities.ChannelType; 4 | import net.dv8tion.jda.core.events.ReadyEvent; 5 | import net.dv8tion.jda.core.events.message.MessageReceivedEvent; 6 | import net.dv8tion.jda.core.hooks.ListenerAdapter; 7 | 8 | public class JDAListener extends ListenerAdapter { 9 | 10 | private final JDACommandManager manager; 11 | 12 | JDAListener(JDACommandManager manager) { 13 | 14 | this.manager = manager; 15 | } 16 | 17 | @Override 18 | public void onMessageReceived(MessageReceivedEvent event) { 19 | if (event.isFromType(ChannelType.TEXT) || event.isFromType(ChannelType.PRIVATE)) { 20 | this.manager.dispatchEvent(event); 21 | } 22 | } 23 | 24 | @Override 25 | public void onReady(ReadyEvent event) { 26 | manager.initializeBotOwner(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /docs/acf-bukkit/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/acf-bungee/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/acf-core/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/acf-jda/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/acf-paper/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/acf-sponge/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/acf-bukkit/co/aikar/commands/contexts/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/acf-bukkit/overview-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/acf-bungee/overview-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/acf-paper/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /.idea/runConfigurations/ACF__All_.xml: -------------------------------------------------------------------------------- 1 |
001package co.aikar.commands; 10 | 002 11 | 003 12 | 004public interface CommandPermissionResolver { 13 | 005 boolean hasPermission(JDACommandManager manager, JDACommandEvent event, String permission); 14 | 006} 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 |76 |
001package co.aikar.commands; 10 | 002 11 | 003public class JDALocales extends Locales { 12 | 004 public JDALocales(CommandManager manager) { 13 | 005 super(manager); 14 | 006 } 15 | 007} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 |77 |
001package co.aikar.commands; 10 | 002 11 | 003import net.dv8tion.jda.core.events.message.MessageReceivedEvent; 12 | 004 13 | 005public interface CommandConfigProvider { 14 | 006 CommandConfig provide(MessageReceivedEvent event); 15 | 007} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 |77 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/acf-jda/src-html/co/aikar/commands/JDAConditionContext.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
001package co.aikar.commands; 10 | 002 11 | 003public class JDAConditionContext extends ConditionContext<JDACommandEvent> { 12 | 004 JDAConditionContext(JDACommandEvent issuer, String config) { 13 | 005 super(issuer, config); 14 | 006 } 15 | 007} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 |77 |
001package co.aikar.commands; 10 | 002 11 | 003import co.aikar.commands.annotation.Conditions; 12 | 004 13 | 005public class BungeeParameterConditionContext <P> extends ParameterConditionContext<P, BungeeCommandExecutionContext, BungeeCommandIssuer> { 14 | 006 BungeeParameterConditionContext(RegisteredCommand cmd, BungeeCommandIssuer issuer, BungeeCommandExecutionContext execContext, Conditions conditions) { 15 | 007 super(cmd, issuer, execContext, conditions); 16 | 008 } 17 | 009} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |79 |
001package co.aikar.commands; 10 | 002 11 | 003import co.aikar.commands.annotation.Conditions; 12 | 004 13 | 005public class SpongeParameterConditionContext <P> extends ParameterConditionContext<P, SpongeCommandExecutionContext, SpongeCommandIssuer> { 14 | 006 SpongeParameterConditionContext(RegisteredCommand cmd, SpongeCommandIssuer issuer, SpongeCommandExecutionContext execContext, Conditions conditions) { 15 | 007 super(cmd, issuer, execContext, conditions); 16 | 008 } 17 | 009} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |79 |
001package co.aikar.commands; 10 | 002 11 | 003import java.util.List; 12 | 004import java.util.Map; 13 | 005 14 | 006public class JDACommandExecutionContext extends CommandExecutionContext<JDACommandExecutionContext, JDACommandEvent> { 15 | 007 JDACommandExecutionContext(RegisteredCommand cmd, CommandParameter param, JDACommandEvent sender, List<String> args, int index, Map<String, Object> passedArgs) { 16 | 008 super(cmd, param, sender, args, index, passedArgs); 17 | 009 } 18 | 010} 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 |80 |
35 | * In the case the language used is Kotlin, Ceylon or any other null-enforcing JVM language,
36 | * you will need to allow for a nullable value.
37 | */
38 | @Retention(RetentionPolicy.RUNTIME)
39 | @Target({ElementType.PARAMETER})
40 | public @interface Optional {
41 | }
42 |
--------------------------------------------------------------------------------
/core/src/main/java/co/aikar/commands/processors/ConditionsProcessor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2018 Daniel Ennis (Aikar) - MIT License
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining
5 | * a copy of this software and associated documentation files (the
6 | * "Software"), to deal in the Software without restriction, including
7 | * without limitation the rights to use, copy, modify, merge, publish,
8 | * distribute, sublicense, and/or sell copies of the Software, and to
9 | * permit persons to whom the Software is furnished to do so, subject to
10 | * the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be
13 | * included in all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | */
23 |
24 | package co.aikar.commands.processors;
25 |
26 | import co.aikar.commands.AnnotationProcessor;
27 | import co.aikar.commands.CommandExecutionContext;
28 | import co.aikar.commands.CommandOperationContext;
29 | import co.aikar.commands.annotation.Conditions;
30 |
31 | @Deprecated /* @deprecated UNFINISHED */
32 | public class ConditionsProcessor implements AnnotationProcessor001package co.aikar.commands;
10 | 002
11 | 003import net.md_5.bungee.api.ChatColor;
12 | 004
13 | 005public class BungeeMessageFormatter extends MessageFormatter<ChatColor> {
14 | 006
15 | 007 public BungeeMessageFormatter(ChatColor... colors) {
16 | 008 super(colors);
17 | 009 }
18 | 010
19 | 011 @Override
20 | 012 String format(ChatColor color, String message) {
21 | 013 return color + message;
22 | 014 }
23 | 015}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | 001package co.aikar.commands;
10 | 002
11 | 003public class JDAMessageFormatter extends MessageFormatter<String> {
12 | 004 public JDAMessageFormatter() {
13 | 005 // JDA does not support coloring messages outside of embed fields.
14 | 006 // We pass three empty strings so as to remove color coded messages from appearing.
15 | 007 super("", "", "");
16 | 008 }
17 | 009
18 | 010 @Override
19 | 011 String format(String color, String message) {
20 | 012 return message;
21 | 013 }
22 | 014}
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | 001package co.aikar.commands;
10 | 002
11 | 003import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
12 | 004import org.jetbrains.annotations.NotNull;
13 | 005
14 | 006import java.util.List;
15 | 007
16 | 008public interface CommandConfig extends CommandConfigProvider {
17 | 009 @NotNull List<String> getCommandPrefixes();
18 | 010
19 | 011 @Override
20 | 012 default CommandConfig provide(MessageReceivedEvent event) {
21 | 013 return this;
22 | 014 }
23 | 015}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | 001package co.aikar.commands.annotation;
10 | 002
11 | 003import java.lang.annotation.ElementType;
12 | 004import java.lang.annotation.Retention;
13 | 005import java.lang.annotation.RetentionPolicy;
14 | 006import java.lang.annotation.Target;
15 | 007
16 | 008/**
17 | 009 * The {@link SelfUser} annotation is to define whether the parameter should be represented by JDA's user object
18 | 010 * or if it should be parsed from command input.
19 | 011 */
20 | 012@Target(ElementType.PARAMETER)
21 | 013@Retention(RetentionPolicy.RUNTIME)
22 | 014public @interface SelfUser {
23 | 015}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
36 | * If an exception handler properly handles an exception, the user will not be noticied by the
37 | * framework that something went unexceptected.
38 | *
39 | * @param command the command that was executed
40 | * @param registeredCommand the registered command
41 | * @param sender the issuer who send the command
42 | * @param args the args he used
43 | * @param t the throwable that caused this exception
44 | *
45 | * @return if the exception was handeled by the exception handler.
46 | */
47 | boolean execute(BaseCommand command, RegisteredCommand registeredCommand, CommandIssuer sender, List001package co.aikar.commands;
10 | 002
11 | 003import org.spongepowered.api.text.Text;
12 | 004import org.spongepowered.api.text.format.TextColor;
13 | 005import org.spongepowered.api.text.serializer.TextSerializers;
14 | 006
15 | 007public class SpongeMessageFormatter extends MessageFormatter<TextColor> {
16 | 008
17 | 009 public SpongeMessageFormatter(TextColor... colors) {
18 | 010 super(colors);
19 | 011 }
20 | 012
21 | 013 public String format(TextColor color, String message) {
22 | 014 return TextSerializers.LEGACY_FORMATTING_CODE.serialize(Text.of(color, message));
23 | 015 }
24 | 016}
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | 001package co.aikar.commands;
10 | 002
11 | 003import co.aikar.locales.MessageKey;
12 | 004import co.aikar.locales.MessageKeyProvider;
13 | 005
14 | 006public enum MinecraftMessageKeys implements MessageKeyProvider {
15 | 007 USERNAME_TOO_SHORT,
16 | 008 IS_NOT_A_VALID_NAME,
17 | 009 MULTIPLE_PLAYERS_MATCH,
18 | 010 NO_PLAYER_FOUND_SERVER,
19 | 011 NO_PLAYER_FOUND
20 | 012 ;
21 | 013
22 | 014 private final MessageKey key = MessageKey.of("acf-minecraft." + this.name().toLowerCase());
23 | 015 public MessageKey getMessageKey() {
24 | 016 return key;
25 | 017 }
26 | 018}
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | 001package co.aikar.commands;
10 | 002
11 | 003import org.jetbrains.annotations.NotNull;
12 | 004
13 | 005import java.util.List;
14 | 006import java.util.concurrent.CopyOnWriteArrayList;
15 | 007
16 | 008public class JDACommandConfig implements CommandConfig {
17 | 009 protected @NotNull List<String> commandPrefixes = new CopyOnWriteArrayList<>(new String[]{"!"});
18 | 010
19 | 011 public JDACommandConfig() {
20 | 012
21 | 013 }
22 | 014
23 | 015 @NotNull
24 | 016 public List<String> getCommandPrefixes() {
25 | 017 return commandPrefixes;
26 | 018 }
27 | 019}
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | All Classes
13 |
15 |
30 |