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
Fields inherited from interface net.minecraft.commands.SharedSuggestionProvider
MATCH_SPLITTER
-
Constructor Summary
ConstructorsConstructorDescriptionClientCommandSourceStack
(CommandSource source, Vec3 position, Vec2 rotation, int permission, String plainTextName, Component displayName, Entity executing) -
Method Summary
Modifier and TypeMethodDescriptionprivate ClientPacketListener
Returns the current connection, used to shorten method calls and hide the nullability warnings.Returns theFeatureFlagSet
from the client side.@Nullable AdvancementHolder
Returns 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 the scoreboard from the client side.Returns the level from the client side.levels()
Returns a set ofResourceKey
for levels from the client side.Returns theRegistryAccess
from the client side.void
sendSuccess
(Supplier<Component> message, boolean sendToAdmins) Sends a success message without attempting to get the server side list of adminsCompletableFuture
<com.mojang.brigadier.suggestion.Suggestions> suggestRegistryElements
(ResourceKey<? extends Registry<?>> registry, SharedSuggestionProvider.ElementSuggestionType suggestionType, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder, com.mojang.brigadier.context.CommandContext<?> context) Methods inherited from class net.minecraft.commands.CommandSourceStack
callback, customSuggestion, dispatcher, facing, facing, getAnchor, getAvailableSounds, getChatMessageChainer, getDisplayName, getEntity, getEntityOrException, getPlayer, getPlayerOrException, getPosition, getRotation, getSigningContext, getTextName, handleError, hasPermission, isPlayer, isSilent, sendChatMessage, sendFailure, sendSystemMessage, shouldFilterMessageTo, withAnchor, withCallback, withCallback, withEntity, withLevel, withMaximumPermission, withPermission, withPosition, withRotation, withSigningContext, withSource, withSuppressedOutput
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.commands.ExecutionCommandSource
clearCallbacks, handleError
Methods inherited from interface net.minecraft.commands.SharedSuggestionProvider
getAbsoluteCoordinates, getCustomTabSugggestions, getRelevantCoordinates, getSelectedEntities, suggestRegistryElements
-
Constructor Details
-
ClientCommandSourceStack
-
-
Method Details
-
connection
Returns the current connection, used to shorten method calls and hide the nullability warnings.- Returns:
- the current connection, used to shorten method calls and hide the nullability warnings
-
sendSuccess
Sends a success message without attempting to get the server side list of admins- Overrides:
sendSuccess
in classCommandSourceStack
-
getAllTeams
Returns the list of teams from the client side.- Specified by:
getAllTeams
in interfaceSharedSuggestionProvider
- Overrides:
getAllTeams
in classCommandSourceStack
- Returns:
- the list of teams from the client side
-
getOnlinePlayerNames
Returns the list of online player names from the client side.- Specified by:
getOnlinePlayerNames
in interfaceSharedSuggestionProvider
- Overrides:
getOnlinePlayerNames
in classCommandSourceStack
- Returns:
- the list of online player names from the client side
-
levels
Returns a set ofResourceKey
for levels from the client side.- Specified by:
levels
in interfaceSharedSuggestionProvider
- Overrides:
levels
in classCommandSourceStack
- Returns:
- a set of
ResourceKey
for levels from the client side
-
registryAccess
Returns theRegistryAccess
from the client side.- Specified by:
registryAccess
in interfaceSharedSuggestionProvider
- Overrides:
registryAccess
in classCommandSourceStack
- Returns:
- the
RegistryAccess
from the client side
-
enabledFeatures
Returns theFeatureFlagSet
from the client side.- Specified by:
enabledFeatures
in interfaceSharedSuggestionProvider
- Overrides:
enabledFeatures
in classCommandSourceStack
- Returns:
- the
FeatureFlagSet
from 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
-
getUnsidedLevel
Returns the level from the client side.- Returns:
- the level from the client side
-
getServer
- Overrides:
getServer
in classCommandSourceStack
- Throws:
UnsupportedOperationException
- because the server isn't available on the client
-
getLevel
- Overrides:
getLevel
in classCommandSourceStack
- Throws:
UnsupportedOperationException
- because the server side level isn't available on the client side
-