Package net.minecraft.command
Class CommandSource
java.lang.Object
net.minecraft.command.CommandSource
- All Implemented Interfaces:
ISuggestionProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.command.ISuggestionProvider
ISuggestionProvider.Coordinates -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EntityAnchorArgument.Typeprivate final com.mojang.brigadier.ResultConsumer<CommandSource>private final ITextComponentprivate final Entitystatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypestatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate final ServerWorldprivate final intprivate final Vector2fprivate final MinecraftServerprivate final booleanprivate final ICommandSourceprivate final Stringprivate final Vector3d -
Constructor Summary
ConstructorsModifierConstructorDescriptionCommandSource(ICommandSource p_i49552_1_, Vector3d p_i49552_2_, Vector2f p_i49552_3_, ServerWorld p_i49552_4_, int p_i49552_5_, String p_i49552_6_, ITextComponent p_i49552_7_, MinecraftServer p_i49552_8_, Entity p_i49552_9_) protectedCommandSource(ICommandSource p_i49553_1_, Vector3d p_i49553_2_, Vector2f p_i49553_3_, ServerWorld p_i49553_4_, int p_i49553_5_, String p_i49553_6_, ITextComponent p_i49553_7_, MinecraftServer p_i49553_8_, Entity p_i49553_9_, boolean p_i49553_10_, com.mojang.brigadier.ResultConsumer<CommandSource> p_i49553_11_, EntityAnchorArgument.Type p_i49553_12_) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidbroadcastToAdmins(ITextComponent p_197020_1_) CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>customSuggestion(com.mojang.brigadier.context.CommandContext<ISuggestionProvider> p_197009_1_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_197009_2_) facing(Entity p_201006_1_, EntityAnchorArgument.Type p_201006_2_) getLevel()booleanhasPermission(int p_197034_1_) levels()voidonCommandComplete(com.mojang.brigadier.context.CommandContext<CommandSource> p_197038_1_, boolean p_197038_2_, int p_197038_3_) voidsendFailure(ITextComponent p_197021_1_) voidsendSuccess(ITextComponent p_197030_1_, boolean p_197030_2_) withAnchor(EntityAnchorArgument.Type p_201010_1_) withCallback(com.mojang.brigadier.ResultConsumer<CommandSource> p_197029_1_) withCallback(com.mojang.brigadier.ResultConsumer<CommandSource> p_209550_1_, BinaryOperator<com.mojang.brigadier.ResultConsumer<CommandSource>> p_209550_2_) withEntity(Entity p_197024_1_) withLevel(ServerWorld p_201003_1_) withMaximumPermission(int p_197026_1_) withPermission(int p_197033_1_) withPosition(Vector3d p_201009_1_) withRotation(Vector2f p_201007_1_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.command.ISuggestionProvider
getAbsoluteCoordinates, getRelevantCoordinates, getSelectedEntities
-
Field Details
-
ERROR_NOT_PLAYER
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NOT_PLAYER -
ERROR_NOT_ENTITY
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NOT_ENTITY -
source
-
worldPosition
-
level
-
permissionLevel
private final int permissionLevel -
textName
-
displayName
-
server
-
silent
private final boolean silent -
entity
-
consumer
-
anchor
-
rotation
-
-
Constructor Details
-
CommandSource
public CommandSource(ICommandSource p_i49552_1_, Vector3d p_i49552_2_, Vector2f p_i49552_3_, ServerWorld p_i49552_4_, int p_i49552_5_, String p_i49552_6_, ITextComponent p_i49552_7_, MinecraftServer p_i49552_8_, @Nullable Entity p_i49552_9_) -
CommandSource
protected CommandSource(ICommandSource p_i49553_1_, Vector3d p_i49553_2_, Vector2f p_i49553_3_, ServerWorld p_i49553_4_, int p_i49553_5_, String p_i49553_6_, ITextComponent p_i49553_7_, MinecraftServer p_i49553_8_, @Nullable Entity p_i49553_9_, boolean p_i49553_10_, com.mojang.brigadier.ResultConsumer<CommandSource> p_i49553_11_, EntityAnchorArgument.Type p_i49553_12_)
-
-
Method Details
-
withEntity
-
withPosition
-
withRotation
-
withCallback
-
withCallback
public CommandSource withCallback(com.mojang.brigadier.ResultConsumer<CommandSource> p_209550_1_, BinaryOperator<com.mojang.brigadier.ResultConsumer<CommandSource>> p_209550_2_) -
withSuppressedOutput
-
withPermission
-
withMaximumPermission
-
withAnchor
-
withLevel
-
facing
public CommandSource facing(Entity p_201006_1_, EntityAnchorArgument.Type p_201006_2_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
facing
public CommandSource facing(Vector3d p_201005_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getDisplayName
-
getTextName
-
hasPermission
public boolean hasPermission(int p_197034_1_) - Specified by:
hasPermissionin interfaceISuggestionProvider
-
getPosition
-
getLevel
-
getEntity
-
getEntityOrException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getPlayerOrException
public ServerPlayerEntity getPlayerOrException() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getRotation
-
getServer
-
getAnchor
-
sendSuccess
-
broadcastToAdmins
-
sendFailure
-
onCommandComplete
public void onCommandComplete(com.mojang.brigadier.context.CommandContext<CommandSource> p_197038_1_, boolean p_197038_2_, int p_197038_3_) -
getOnlinePlayerNames
- Specified by:
getOnlinePlayerNamesin interfaceISuggestionProvider
-
getAllTeams
- Specified by:
getAllTeamsin interfaceISuggestionProvider
-
getAvailableSoundEvents
- Specified by:
getAvailableSoundEventsin interfaceISuggestionProvider
-
getRecipeNames
- Specified by:
getRecipeNamesin interfaceISuggestionProvider
-
customSuggestion
public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> customSuggestion(com.mojang.brigadier.context.CommandContext<ISuggestionProvider> p_197009_1_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_197009_2_) - Specified by:
customSuggestionin interfaceISuggestionProvider
-
levels
- Specified by:
levelsin interfaceISuggestionProvider
-
registryAccess
- Specified by:
registryAccessin interfaceISuggestionProvider
-