From 7f3ecfd42fef3119350367aedff63d6755a61313 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Thu, 8 Jul 2021 05:55:58 -0700 Subject: [PATCH] fix test plugin --- .../paperweight/testplugin/TestPlugin.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/io/papermc/paperweight/testplugin/TestPlugin.java b/src/main/java/io/papermc/paperweight/testplugin/TestPlugin.java index 715a5c4..5b93821 100644 --- a/src/main/java/io/papermc/paperweight/testplugin/TestPlugin.java +++ b/src/main/java/io/papermc/paperweight/testplugin/TestPlugin.java @@ -22,19 +22,19 @@ public final class TestPlugin extends JavaPlugin implements Listener { ((CraftServer) this.getServer()).getServer().vanillaCommandDispatcher.getDispatcher().register( literal("paperweight") .requires(stack -> stack.hasPermission(stack.getServer().getOperatorUserPermissionLevel())) - .then(argument("players", players())) - .executes(ctx -> { - final Collection players = EntityArgument.getPlayers(ctx, "players"); - for (final ServerPlayer player : players) { - player.sendMessage( - new TextComponent("Hello from Paperweight test plugin!") - .withStyle(ChatFormatting.ITALIC, ChatFormatting.GREEN) - .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/paperweight @a"))), - Util.NIL_UUID - ); - } - return players.size(); - }) + .then(argument("players", players()) + .executes(ctx -> { + final Collection players = EntityArgument.getPlayers(ctx, "players"); + for (final ServerPlayer player : players) { + player.sendMessage( + new TextComponent("Hello from Paperweight test plugin!") + .withStyle(ChatFormatting.ITALIC, ChatFormatting.GREEN) + .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/paperweight @a"))), + Util.NIL_UUID + ); + } + return players.size(); + })) ); } }