From 7dd7937650025db92fd711507edde62d56717246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Sat, 13 Jan 2024 09:52:54 +0100 Subject: [PATCH] feat: update cloud --- .../java/org/incendo/cloud/spring/SpringCommandManager.java | 2 +- .../incendo/cloud/spring/example/commands/ListCatCommand.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cloud-spring/src/main/java/org/incendo/cloud/spring/SpringCommandManager.java b/cloud-spring/src/main/java/org/incendo/cloud/spring/SpringCommandManager.java index ca89045..9147a11 100644 --- a/cloud-spring/src/main/java/org/incendo/cloud/spring/SpringCommandManager.java +++ b/cloud-spring/src/main/java/org/incendo/cloud/spring/SpringCommandManager.java @@ -144,6 +144,6 @@ private void registerDefaultExceptionHandlers() { .registerHandler(NoPermissionException.class, ctx -> LOGGER.error(MESSAGE_NO_PERMS)) .registerHandler(InvalidCommandSenderException.class, ctx -> LOGGER.error(ctx.exception().getMessage())) .registerHandler(InvalidSyntaxException.class, - ctx -> LOGGER.error(MESSAGE_INVALID_SYNTAX + ctx.exception().getCorrectSyntax())); + ctx -> LOGGER.error(MESSAGE_INVALID_SYNTAX + ctx.exception().correctSyntax())); } } diff --git a/example/src/main/java/org/incendo/cloud/spring/example/commands/ListCatCommand.java b/example/src/main/java/org/incendo/cloud/spring/example/commands/ListCatCommand.java index 6f4e560..d9aaed8 100644 --- a/example/src/main/java/org/incendo/cloud/spring/example/commands/ListCatCommand.java +++ b/example/src/main/java/org/incendo/cloud/spring/example/commands/ListCatCommand.java @@ -23,8 +23,8 @@ // package org.incendo.cloud.spring.example.commands; +import cloud.commandframework.annotations.Command; import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; import org.checkerframework.checker.nullness.qual.NonNull; import org.incendo.cloud.spring.SpringCommandSender; import org.incendo.cloud.spring.annotation.CommandGroup; @@ -58,7 +58,7 @@ public ListCatCommand(final @NonNull CatService catService) { */ @CommandGroup("Cat") @CommandDescription("List the cats") - @CommandMethod("cat list") + @Command("cat list") public void listCats(final @NonNull SpringCommandSender sender) { sender.writeLine("Cats"); this.catService.cats().forEach(cat -> sender.writeLine(String.format("- %s (Age: %d)", cat.name(), cat.age())));