2
2
3
3
<div align =" center " >
4
4
5
- [ ![ Build ] ( https://github.com/Despical/CommandFramework/actions/workflows/build-commandframework.yml/badge.svg )] ( https://github.com/Despical/CommandFramework/actions/workflows/build-commandframework.yml )
5
+ [ ![ ] ( https://github.com/Despical/CommandFramework/actions/workflows/build-commandframework.yml/badge.svg )] ( https://github.com/Despical/CommandFramework/actions/workflows/build-commandframework.yml )
6
6
[ ![ ] ( https://jitpack.io/v/Despical/CommandFramework.svg )] ( https://jitpack.io/#Despical/CommandFramework )
7
7
[ ![ ] ( https://img.shields.io/badge/JavaDocs-latest-lime.svg )] ( https://javadoc.jitpack.io/com/github/Despical/CommandFramework/latest/javadoc/index.html )
8
- [ ![ Support] ( https://img.shields.io/badge/Patreon-Support-lime.svg?logo=Patreon )] ( https://www.patreon.com/despical )
8
+ [ ![ ] ( https://img.shields.io/badge/Patreon-Support-lime.svg?logo=Patreon )] ( https://www.patreon.com/despical )
9
+ [ ![ ] ( https://img.shields.io/badge/BuyMeACoffee-Support-lime.svg?logo=BuyMeACoffee )] ( https://www.buymeacoffee.com/despical )
9
10
10
11
This framework is very lightweight annotation based command system that works similar to Bukkit's event system. It removes the necessity to
11
12
add commands to your plugin.yml but will still allow you to set command usage, description, permission, aliases, sender type, cooldown, minimum
@@ -86,7 +87,7 @@ public class ExampleClass extends JavaPlugin {
86
87
String label = arguments. getLabel(), arg = arguments. getArgument(0 );
87
88
88
89
// StringMatcher is an external class from Despical's Commons library which is not in this framework
89
- ListStringMatcher . Match > matches = StringMatcher . match(arg, commandFramework. getCommands(). stream(). map(cmd - > cmd. name(). replace(label + " ." , " " )). collect(Collectors . toList()));
90
+ List< StringMatcher .Match > matches = StringMatcher . match(arg, commandFramework. getCommands(). stream(). map(cmd - > cmd. name(). replace(label + " ." , " " )). collect(Collectors . toList()));
90
91
91
92
if (! matches. isEmpty()) {
92
93
arguments. sendMessage(" Did you mean %command%?" . replace(" %command%" , label + " " + matches. get(0 ). getMatch()));
@@ -129,7 +130,7 @@ public class ExampleClass extends JavaPlugin {
129
130
name = " nocommandargs"
130
131
)
131
132
public void noCommandArgsTest () {
132
- Logger . getLogger(this . getClass(). getSimpleName()). info(" This command is annotated with @NoCommandArguments to run without required parameters." );
133
+ Logger . getLogger(this . getClass(). getSimpleName()). info(" This command is running without any parameters." );
133
134
}
134
135
135
136
@Command (
@@ -147,8 +148,7 @@ public class ExampleClass extends JavaPlugin {
147
148
name = " example" ,
148
149
aliases = {" firstAlias" , " secondAlias" }
149
150
)
150
- public List<String > exampleCommandCompletion (CommandArguments arguments ) {
151
- // And you've created a tab completion for the command above
151
+ public List<String > exampleCommandCompletion (/* CommandArguments arguments*/ /* no need to use in this case which is also supported*/ ) {
152
152
return Arrays . asList(" first" , " second" , " third" );
153
153
}
154
154
}
@@ -182,7 +182,8 @@ You can learn more about contributing via GitHub in [contribution guidelines](..
182
182
To build this project from source code, run the following from Git Bash:
183
183
```
184
184
git clone https://www.github.com/Despical/CommandFramework && cd CommandFramework
185
- mvn clean package -Dmaven.javadoc.skip=true
185
+ mvn clean package -DskipTests - Dmaven.javadoc.skip=true
186
186
```
187
187
188
- > ** Note** Don't forget to install Maven before building.
188
+ > [ !IMPORTANT]
189
+ > Don't forget to install Maven before building.
0 commit comments