-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In this commit we had removed everything about Cloud, and switched to another command framework called LiteCommands. Reviewed-by: xiaoACE6716, SNWCreations Tested-by: huanmeng_qwq
- Loading branch information
1 parent
afbf3ca
commit 9ce8ef6
Showing
38 changed files
with
1,040 additions
and
3,757 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
### 从Cloud迁移到LiteCommands | ||
|
||
### 注解 | ||
|
||
| Cloud | LiteCommands | | ||
|------------------------|-----------------------| | ||
| @CommandContainer | @RootCommand | | ||
| @CommandMethod("test") | @Command(name="test") | | ||
| @Argument | @Arg | | ||
|
||
### 示例 | ||
#### Cloud | ||
|
||
```java | ||
@CommandContainer | ||
@CommandPrefix("!") | ||
@CommandMethod("test") | ||
public class TestCloudCommand { | ||
@CommandMethod("sub1 <parm1>") | ||
public void sub1(CommandSender sender, Message message, @Argument("parm1") String parm1) { | ||
// ... | ||
} | ||
} | ||
``` | ||
|
||
#### LiteCommands | ||
> Github: [LiteCommands](https://github.com/Rollczi/LiteCommands) | ||
> | ||
> IDEA中安装[LiteCommands](https://plugins.jetbrains.com/plugin/20799-litecommands)插件后,可以自动识别LiteCommands的注解,并能够很好的辅助开发。 | ||
```java | ||
import dev.rollczi.litecommands.annotations.argument.Arg; | ||
import dev.rollczi.litecommands.annotations.command.Command; | ||
import dev.rollczi.litecommands.annotations.context.Context; | ||
import dev.rollczi.litecommands.annotations.execute.Execute; | ||
import snw.kookbc.impl.command.litecommands.annotations.prefix.Prefix; | ||
|
||
@Command(name = "test") | ||
@Prefix("!") | ||
public class TestLiteCommand { | ||
@Execute(name = "sub1") | ||
public void sub1(@Context CommandSender sender, | ||
@Context Message message, | ||
@Arg("parm1") String parm1) { | ||
// ... | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.