From 1e4128c895ae93e539a7e6c1f660043459786f35 Mon Sep 17 00:00:00 2001 From: Apex Date: Sat, 7 Sep 2024 06:18:26 +0100 Subject: [PATCH] Add back missing admin permission to command Add some basic javadoc explaining command structure --- .../neoforged/neoforge/flag/FlagsCommand.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/net/neoforged/neoforge/flag/FlagsCommand.java b/src/main/java/net/neoforged/neoforge/flag/FlagsCommand.java index 7e5590ca14..2b3eb89ca3 100644 --- a/src/main/java/net/neoforged/neoforge/flag/FlagsCommand.java +++ b/src/main/java/net/neoforged/neoforge/flag/FlagsCommand.java @@ -16,6 +16,7 @@ import java.util.Set; import java.util.stream.Collectors; import net.minecraft.commands.CommandSourceStack; +import net.minecraft.commands.Commands; import net.minecraft.commands.SharedSuggestionProvider; import net.minecraft.commands.arguments.ResourceLocationArgument; import net.minecraft.network.chat.ClickEvent; @@ -23,10 +24,25 @@ import net.minecraft.network.chat.HoverEvent; import org.jetbrains.annotations.ApiStatus; +/** + * Command used for easy {@link Flag} manipulation. + *

+ * This command requires permission level: {@link Commands#LEVEL_ADMINS}. + * + *

+ * Note: Replace {@code } with any valid {@link Flag} identifier + */ @ApiStatus.Internal public interface FlagsCommand { static ArgumentBuilder register() { return literal("flags") + .requires(src -> src.hasPermission(Commands.LEVEL_ADMINS)) .then(literal("list").executes(context -> { listFlagsFor(context, true); listFlagsFor(context, false);