🎨 Update example plugins to the new meta format

This commit is contained in:
Alexander Söderberg 2020-12-18 19:12:55 +01:00 committed by Alexander Söderberg
parent 9ed40a698a
commit 97e447739c
2 changed files with 4 additions and 3 deletions

View file

@ -221,7 +221,7 @@ public final class ExamplePlugin extends JavaPlugin {
// Add a confirmation command // Add a confirmation command
// //
this.manager.command(builder.literal("confirm") this.manager.command(builder.literal("confirm")
.meta("description", "Confirm a pending command") .meta(CommandMeta.DESCRIPTION, "Confirm a pending command")
.handler(this.confirmationManager.createConfirmationExecutionHandler())); .handler(this.confirmationManager.createConfirmationExecutionHandler()));
// //
// Create a world argument // Create a world argument
@ -318,7 +318,7 @@ public final class ExamplePlugin extends JavaPlugin {
// A command to change the color scheme for the help command // A command to change the color scheme for the help command
// //
manager.command(builder manager.command(builder
.meta("description", "Sets the color scheme for '/example help'") .meta(CommandMeta.DESCRIPTION, "Sets the color scheme for '/example help'")
.literal("helpcolors") .literal("helpcolors")
.argument( .argument(
TextColorArgument.of("primary"), TextColorArgument.of("primary"),

View file

@ -33,6 +33,7 @@ import cloud.commandframework.bungee.arguments.ServerArgument;
import cloud.commandframework.execution.AsynchronousCommandExecutionCoordinator; import cloud.commandframework.execution.AsynchronousCommandExecutionCoordinator;
import cloud.commandframework.execution.CommandExecutionCoordinator; import cloud.commandframework.execution.CommandExecutionCoordinator;
import cloud.commandframework.extra.confirmation.CommandConfirmationManager; import cloud.commandframework.extra.confirmation.CommandConfirmationManager;
import cloud.commandframework.meta.CommandMeta;
import cloud.commandframework.minecraft.extras.MinecraftExceptionHandler; import cloud.commandframework.minecraft.extras.MinecraftExceptionHandler;
import net.kyori.adventure.platform.bungeecord.BungeeAudiences; import net.kyori.adventure.platform.bungeecord.BungeeAudiences;
import net.kyori.adventure.text.Component; import net.kyori.adventure.text.Component;
@ -108,7 +109,7 @@ public final class ExamplePlugin extends Plugin {
// Add a confirmation command // Add a confirmation command
// //
this.manager.command(builder.literal("confirm") this.manager.command(builder.literal("confirm")
.meta("description", "Confirm a pending command") .meta(CommandMeta.DESCRIPTION, "Confirm a pending command")
.handler(this.confirmationManager.createConfirmationExecutionHandler())); .handler(this.confirmationManager.createConfirmationExecutionHandler()));
final CommandArgument<CommandSender, ProxiedPlayer> playerArgument = PlayerArgument.of("player"); final CommandArgument<CommandSender, ProxiedPlayer> playerArgument = PlayerArgument.of("player");