Package net.neoforged.neoforge.client
Class ClientCommandSourceStack
java.lang.Object
net.minecraft.commands.CommandSourceStack
net.neoforged.neoforge.client.ClientCommandSourceStack
- All Implemented Interfaces:
ExecutionCommandSource<CommandSourceStack>,SharedSuggestionProvider,ICommandSourceStackExtension
overrides for
CommandSourceStack so that the methods will run successfully client side-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.commands.SharedSuggestionProvider
SharedSuggestionProvider.ElementSuggestionType, SharedSuggestionProvider.TextCoordinates -
Field Summary
Fields inherited from class net.minecraft.commands.CommandSourceStack
ERROR_NOT_ENTITY, ERROR_NOT_PLAYER, source -
Constructor Summary
ConstructorsConstructorDescriptionClientCommandSourceStack(CommandSource source, Vec3 position, Vec2 rotation, int permission, String plainTextName, Component displayName, Entity executing) -
Method Summary
Modifier and TypeMethodDescriptionReturns the advancement from the id from the client side where the advancement needs to be visible to the player.Returns the list of teams from the client side.getLevel()Returns the list of online player names from the client side.Returns theRecipeManagerfrom the client side.Returns aStreamof recipe ids that are available on the client.Returns the scoreboard from the client side.Returns the level from the client side.levels()Returns a set ofResourceKeyfor levels from the client side.Returns theRegistryAccessfrom the client side.voidsendSuccess(Supplier<Component> message, boolean sendToAdmins) Sends a success message without attempting to get the server side list of adminsMethods inherited from class net.minecraft.commands.CommandSourceStack
callback, customSuggestion, dispatcher, enabledFeatures, facing, facing, getAnchor, getAvailableSounds, getChatMessageChainer, getDisplayName, getEntity, getEntityOrException, getPlayer, getPlayerOrException, getPosition, getRotation, getSigningContext, getTextName, handleError, hasPermission, isPlayer, isSilent, sendChatMessage, sendFailure, sendSystemMessage, shouldFilterMessageTo, suggestRegistryElements, withAnchor, withCallback, withCallback, withEntity, withLevel, withMaximumPermission, withPermission, withPosition, withRotation, withSigningContext, withSource, withSuppressedOutputMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.commands.ExecutionCommandSource
clearCallbacks, handleErrorMethods inherited from interface net.minecraft.commands.SharedSuggestionProvider
getAbsoluteCoordinates, getCustomTabSugggestions, getRelevantCoordinates, getSelectedEntities, suggestRegistryElements
-
Constructor Details
-
ClientCommandSourceStack
-
-
Method Details
-
sendSuccess
Sends a success message without attempting to get the server side list of admins- Overrides:
sendSuccessin classCommandSourceStack
-
getAllTeams
Returns the list of teams from the client side.- Specified by:
getAllTeamsin interfaceSharedSuggestionProvider- Overrides:
getAllTeamsin classCommandSourceStack- Returns:
- the list of teams from the client side
-
getOnlinePlayerNames
Returns the list of online player names from the client side.- Specified by:
getOnlinePlayerNamesin interfaceSharedSuggestionProvider- Overrides:
getOnlinePlayerNamesin classCommandSourceStack- Returns:
- the list of online player names from the client side
-
getRecipeNames
Returns aStreamof recipe ids that are available on the client.- Specified by:
getRecipeNamesin interfaceSharedSuggestionProvider- Overrides:
getRecipeNamesin classCommandSourceStack- Returns:
- a
Streamof recipe ids that are available on the client
-
levels
Returns a set ofResourceKeyfor levels from the client side.- Specified by:
levelsin interfaceSharedSuggestionProvider- Overrides:
levelsin classCommandSourceStack- Returns:
- a set of
ResourceKeyfor levels from the client side
-
registryAccess
Returns theRegistryAccessfrom the client side.- Specified by:
registryAccessin interfaceSharedSuggestionProvider- Overrides:
registryAccessin classCommandSourceStack- Returns:
- the
RegistryAccessfrom the client side
-
getScoreboard
Returns the scoreboard from the client side.- Returns:
- the scoreboard from the client side
-
getAdvancement
Returns the advancement from the id from the client side where the advancement needs to be visible to the player.- Returns:
- the advancement from the id from the client side where the advancement needs to be visible to the player
-
getRecipeManager
Returns theRecipeManagerfrom the client side.- Returns:
- the
RecipeManagerfrom the client side
-
getUnsidedLevel
Returns the level from the client side.- Returns:
- the level from the client side
-
getServer
- Overrides:
getServerin classCommandSourceStack- Throws:
UnsupportedOperationException- because the server isn't available on the client
-
getLevel
- Overrides:
getLevelin classCommandSourceStack- Throws:
UnsupportedOperationException- because the server side level isn't available on the client side
-