Skip to content

Commit

Permalink
feat: 更新litecommands至3.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
huanmeng-qwq committed Oct 19, 2024
1 parent 7f023d7 commit b56d432
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CLOUD_MIGRATE_TO_LITECOMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import snw.kookbc.impl.command.litecommands.annotations.prefix.Prefix;
@Prefix("!")
public class TestLiteCommand {
@Execute(name = "sub1")
public void sub1(@Context CommandSender sender,
public void sub1(@Sender CommandSender sender,
@Context Message message,
@Arg("parm1") String parm1) {
// ...
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ com-github-snwcreations-jkook = "9bca6457fc"
com-github-snwcreations-terminalconsoleappender = "1.3.5"
com-google-code-gson-gson = "2.10.1"
com-squareup-okhttp3-okhttp = "4.10.0"
dev-rollczi-litecommands-framework = "3.7.0"
dev-rollczi-litecommands-framework = "3.7.1"
net-bytebuddy-byte-buddy = "1.12.10"
net-bytebuddy-byte-buddy-agent = "1.12.10"
net-fabricmc-sponge-mixin = "0.15.2+mixin.0.8.7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package snw.kookbc.impl.command.litecommands.internal;

import dev.rollczi.litecommands.annotations.command.Command;
import dev.rollczi.litecommands.annotations.context.Context;
import dev.rollczi.litecommands.annotations.context.Sender;
import dev.rollczi.litecommands.annotations.description.Description;
import dev.rollczi.litecommands.annotations.execute.Execute;
import dev.rollczi.litecommands.annotations.inject.Inject;
Expand All @@ -42,7 +42,7 @@ public PluginsCommand(KBCClient client) {
}

@Execute
String execute(@Context CommandSender sender) {
String execute(@Sender CommandSender sender) {
Plugin[] plugins = client.getCore().getPluginManager().getPlugins();
return String.format("%s (%d): %s",
(sender instanceof ConsoleCommandSender) ? "Installed and running plugins" : "已安装并正在运行的插件",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import dev.rollczi.litecommands.annotations.command.Command;
import dev.rollczi.litecommands.annotations.context.Context;
import dev.rollczi.litecommands.annotations.context.Sender;
import dev.rollczi.litecommands.annotations.description.Description;
import dev.rollczi.litecommands.annotations.execute.Execute;
import dev.rollczi.litecommands.annotations.inject.Inject;
Expand All @@ -21,7 +22,7 @@ public StopCommand(KBCClient client) {

@Execute
@Description("停止实例。")
public Object executeStop(@Context CommandSender sender, @Context Message message) {
public Object executeStop(@Sender CommandSender sender, @Context Message message) {
// Execute the /stop
if (sender instanceof User) {
if (client.getConfig().getBoolean("ignore-remote-call-invisible-internal-command", true)) {
Expand Down

0 comments on commit b56d432

Please sign in to comment.