Class PlayerListArgument
java.lang.Object
net.kamkeyke.raccooncore.command.argumenttype.PlayerListArgument
public class PlayerListArgument
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<List<String>>
Custom argument type for commands that allows the selection of multiple player names in a
formatted list enclosed in curly braces. Makes it easier to pass multiple players as arguments.
Expected format: {player1,player2,player3...}
This class handles the parsing of the input string and provides real-time tab-completion suggestions, filtering online player names after each comma or at the start of the list.
- See Also:
-
ArgumentType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPlayerList(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String name) <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) parse(com.mojang.brigadier.StringReader stringReader) static PlayerListArgumentplayers()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mojang.brigadier.arguments.ArgumentType
getExamples
-
Constructor Details
-
PlayerListArgument
public PlayerListArgument()
-
-
Method Details
-
players
-
getPlayerList
-
parse
-
listSuggestions
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
-