Class PlayerArgumentType
java.lang.Object
net.uku3lig.ukulib.fabric.PlayerArgumentType
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<PlayerArgumentType.PlayerSelector>
@Deprecated(forRemoval=true)
public class PlayerArgumentType
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<PlayerArgumentType.PlayerSelector>
Deprecated, for removal: This API element is subject to removal in a future version.
An argument type which represents players. Can only be used in client commands.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordDeprecated, for removal: This API element is subject to removal in a future version.Simple record used to store the player name for later use -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeDeprecated, for removal: This API element is subject to removal in a future version.The exception thrown when the selected player is not found. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.static net.minecraft.world.entity.player.PlayergetPlayer(String name, com.mojang.brigadier.context.CommandContext<net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource> context) Deprecated, for removal: This API element is subject to removal in a future version.Gets the player passed to the command.<S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) Deprecated, for removal: This API element is subject to removal in a future version.parse(com.mojang.brigadier.StringReader reader) Deprecated, for removal: This API element is subject to removal in a future version.static PlayerArgumentTypeplayer()Deprecated, for removal: This API element is subject to removal in a future version.Returns a new instance.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mojang.brigadier.arguments.ArgumentType
parse
-
Field Details
-
PLAYER_NOT_FOUND_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType PLAYER_NOT_FOUND_EXCEPTIONDeprecated, for removal: This API element is subject to removal in a future version.The exception thrown when the selected player is not found.
-
-
Method Details
-
player
Deprecated, for removal: This API element is subject to removal in a future version.Returns a new instance.- Returns:
- The instance
-
getPlayer
public static net.minecraft.world.entity.player.Player getPlayer(String name, com.mojang.brigadier.context.CommandContext<net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource> context) throws com.mojang.brigadier.exceptions.CommandSyntaxException Deprecated, for removal: This API element is subject to removal in a future version.Gets the player passed to the command.- Parameters:
name- The name of the argumentcontext- The command context- Returns:
- The player entity
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException- if the player is not found
-
parse
public PlayerArgumentType.PlayerSelector parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
parsein interfacecom.mojang.brigadier.arguments.ArgumentType<PlayerArgumentType.PlayerSelector>- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
listSuggestionsin interfacecom.mojang.brigadier.arguments.ArgumentType<PlayerArgumentType.PlayerSelector>
-
getExamples
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getExamplesin interfacecom.mojang.brigadier.arguments.ArgumentType<PlayerArgumentType.PlayerSelector>
-
PlayerArgumentTypeinstead.