Class CommandHelper
java.lang.Object
at.setup_studios.mc_milsim.commands.CommandHelper
Utility class providing helper functions for command processing.
Contains methods for team management, suggestions, and color handling.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.brigadier.suggestion.SuggestionProvider
<net.minecraft.commands.CommandSourceStack> Suggestion provider for chat color auto-completion.static final com.mojang.brigadier.suggestion.SuggestionProvider
<net.minecraft.commands.CommandSourceStack> Suggestion provider for team name auto-completion. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Team
findTeamByName
(String name) Finds a team by its name.static net.minecraft.ChatFormatting
getChatFormatting
(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String argumentName) Retrieves ChatFormatting from command context.Gets a list of all team names.
-
Field Details
-
TEAM_SUGGESTIONS
public static final com.mojang.brigadier.suggestion.SuggestionProvider<net.minecraft.commands.CommandSourceStack> TEAM_SUGGESTIONSSuggestion provider for team name auto-completion. Suggests existing team names that match the partial input. -
COLOR_SUGGESTIONS
public static final com.mojang.brigadier.suggestion.SuggestionProvider<net.minecraft.commands.CommandSourceStack> COLOR_SUGGESTIONSSuggestion provider for chat color auto-completion. Suggests all available Minecraft chat colors.
-
-
Constructor Details
-
CommandHelper
public CommandHelper()
-
-
Method Details
-
findTeamByName
-
getTeamNames
-
getChatFormatting
public static net.minecraft.ChatFormatting getChatFormatting(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String argumentName) Retrieves ChatFormatting from command context.- Parameters:
context
- The command context containing the color argumentargumentName
- The name of the argument containing the color name- Returns:
- The corresponding ChatFormatting object
-