Package net.minecraft.client.network
Class ClientCommandSource
java.lang.Object
net.minecraft.client.network.ClientCommandSource
- All Implemented Interfaces:
CommandSource
@Environment(CLIENT) public class ClientCommandSource extends Object implements CommandSource
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.command.CommandSource
CommandSource.RelativePosition
-
Field Summary
Fields Modifier and Type Field Description private MinecraftClient
client
private int
completionId
private ClientPlayNetworkHandler
networkHandler
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
pendingCompletion
-
Constructor Summary
Constructors Constructor Description ClientCommandSource(ClientPlayNetworkHandler networkHandler, MinecraftClient client)
-
Method Summary
Modifier and Type Method Description private static String
format(double d)
private static String
format(int i)
Collection<CommandSource.RelativePosition>
getBlockPositionSuggestions()
CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
getCompletions(com.mojang.brigadier.context.CommandContext<CommandSource> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
Collection<String>
getEntitySuggestions()
Collection<String>
getPlayerNames()
Collection<CommandSource.RelativePosition>
getPositionSuggestions()
Stream<Identifier>
getRecipeIds()
DynamicRegistryManager
getRegistryManager()
Collection<Identifier>
getSoundIds()
Collection<String>
getTeamNames()
Set<RegistryKey<World>>
getWorldKeys()
boolean
hasPermissionLevel(int level)
void
onCommandSuggestions(int completionId, com.mojang.brigadier.suggestion.Suggestions suggestions)
-
Field Details
-
networkHandler
-
client
-
completionId
private int completionId -
pendingCompletion
-
-
Constructor Details
-
ClientCommandSource
-
-
Method Details
-
getPlayerNames
- Specified by:
getPlayerNames
in interfaceCommandSource
-
getEntitySuggestions
- Specified by:
getEntitySuggestions
in interfaceCommandSource
-
getTeamNames
- Specified by:
getTeamNames
in interfaceCommandSource
-
getSoundIds
- Specified by:
getSoundIds
in interfaceCommandSource
-
getRecipeIds
- Specified by:
getRecipeIds
in interfaceCommandSource
-
hasPermissionLevel
public boolean hasPermissionLevel(int level)- Specified by:
hasPermissionLevel
in interfaceCommandSource
-
getCompletions
public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> getCompletions(com.mojang.brigadier.context.CommandContext<CommandSource> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)- Specified by:
getCompletions
in interfaceCommandSource
-
format
-
format
-
getBlockPositionSuggestions
- Specified by:
getBlockPositionSuggestions
in interfaceCommandSource
-
getPositionSuggestions
- Specified by:
getPositionSuggestions
in interfaceCommandSource
-
getWorldKeys
- Specified by:
getWorldKeys
in interfaceCommandSource
-
getRegistryManager
- Specified by:
getRegistryManager
in interfaceCommandSource
-
onCommandSuggestions
public void onCommandSuggestions(int completionId, com.mojang.brigadier.suggestion.Suggestions suggestions)
-