Skip to content

Commit

Permalink
litecommands版本更新至3.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
huanmeng-qwq committed Feb 13, 2024
1 parent ffd6492 commit 426f489
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
<dependency>
<groupId>dev.rollczi</groupId>
<artifactId>litecommands-framework</artifactId>
<version>3.3.3</version>
<version>3.3.4</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ class StringHandler implements ResultHandler<CommandSender, String> {
@Override
public void handle(Invocation<CommandSender> invocation, String result, ResultHandlerChain<CommandSender> chain) {
CommandSender sender = invocation.sender();
Message message = null;
try {
message = invocation.context().get(Message.class).orElse(null);
} catch (NullPointerException ignored) {
}
// Core core = invocation.context().get(Core.class).orElseThrow(() -> new IllegalStateException("Core is not present"));
Message message = invocation.context().get(Message.class).orElse(null);
if (sender instanceof User) {
if (message != null) {
message.reply(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@
public class KookMessageContextual implements ContextProvider<CommandSender, Message> {
@Override
public ContextResult<Message> provide(Invocation<CommandSender> invocation) {
Optional<Message> message = Optional.empty();
try {
message = invocation.context().get(Message.class);
} catch (NullPointerException ignored) {
}
Optional<Message> message = invocation.context().get(Message.class);
if (message.isPresent()) {
return ContextResult.ok(message::get);
}
Expand Down

0 comments on commit 426f489

Please sign in to comment.