Package net.minecraft.command
Interface CommandSource
- All Known Implementing Classes:
ClientCommandSource
,ServerCommandSource
public interface CommandSource
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CommandSource.RelativePosition
-
Method Summary
Modifier and Type Method Description static <T> void
forEachMatching(Iterable<T> candidates, String string, String string2, Function<T,Identifier> identifier, Consumer<T> action)
static <T> void
forEachMatching(Iterable<T> candidates, String string, Function<T,Identifier> identifier, Consumer<T> action)
default Collection<CommandSource.RelativePosition>
getBlockPositionSuggestions()
CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
getCompletions(com.mojang.brigadier.context.CommandContext<CommandSource> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
default Collection<String>
getEntitySuggestions()
Collection<String>
getPlayerNames()
default Collection<CommandSource.RelativePosition>
getPositionSuggestions()
Stream<Identifier>
getRecipeIds()
DynamicRegistryManager
getRegistryManager()
Collection<Identifier>
getSoundIds()
Collection<String>
getTeamNames()
Set<RegistryKey<World>>
getWorldKeys()
boolean
hasPermissionLevel(int level)
static boolean
method_27136(String string, String string2)
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestColumnPositions(String string, Collection<CommandSource.RelativePosition> collection, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder, Predicate<String> predicate)
static <T> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestFromIdentifier(Iterable<T> candidates, com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Function<T,Identifier> identifier, Function<T,com.mojang.brigadier.Message> tooltip)
static <T> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestFromIdentifier(Stream<T> candidates, com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Function<T,Identifier> identifier, Function<T,com.mojang.brigadier.Message> tooltip)
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestIdentifiers(Iterable<Identifier> candidates, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestIdentifiers(Iterable<Identifier> candidates, com.mojang.brigadier.suggestion.SuggestionsBuilder builder, String string)
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestIdentifiers(Stream<Identifier> stream, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestMatching(Iterable<String> iterable, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder)
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestMatching(String[] string, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder)
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestMatching(Stream<String> stream, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder)
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestPositions(String string, Collection<CommandSource.RelativePosition> candidates, com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Predicate<String> predicate)
-
Method Details
-
getPlayerNames
Collection<String> getPlayerNames() -
getEntitySuggestions
-
getTeamNames
Collection<String> getTeamNames() -
getSoundIds
Collection<Identifier> getSoundIds() -
getRecipeIds
Stream<Identifier> getRecipeIds() -
getCompletions
CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> getCompletions(com.mojang.brigadier.context.CommandContext<CommandSource> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) -
getBlockPositionSuggestions
-
getPositionSuggestions
-
getWorldKeys
Set<RegistryKey<World>> getWorldKeys() -
getRegistryManager
DynamicRegistryManager getRegistryManager() -
hasPermissionLevel
boolean hasPermissionLevel(int level) -
forEachMatching
static <T> void forEachMatching(Iterable<T> candidates, String string, Function<T,Identifier> identifier, Consumer<T> action) -
forEachMatching
-
suggestIdentifiers
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestIdentifiers(Iterable<Identifier> candidates, com.mojang.brigadier.suggestion.SuggestionsBuilder builder, String string) -
suggestIdentifiers
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestIdentifiers(Iterable<Identifier> candidates, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) -
suggestFromIdentifier
static <T> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestFromIdentifier(Iterable<T> candidates, com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Function<T,Identifier> identifier, Function<T,com.mojang.brigadier.Message> tooltip) -
suggestIdentifiers
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestIdentifiers(Stream<Identifier> stream, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) -
suggestFromIdentifier
static <T> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestFromIdentifier(Stream<T> candidates, com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Function<T,Identifier> identifier, Function<T,com.mojang.brigadier.Message> tooltip) -
suggestPositions
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestPositions(String string, Collection<CommandSource.RelativePosition> candidates, com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Predicate<String> predicate) -
suggestColumnPositions
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestColumnPositions(String string, Collection<CommandSource.RelativePosition> collection, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder, Predicate<String> predicate) -
suggestMatching
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestMatching(Iterable<String> iterable, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder) -
suggestMatching
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestMatching(Stream<String> stream, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder) -
suggestMatching
static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestMatching(String[] string, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder) -
method_27136
-