Package net.minecraft.server.commands
Class DataPackCommand
java.lang.Object
net.minecraft.server.commands.DataPackCommand
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.suggestion.SuggestionProvider
<CommandSourceStack> private static final com.mojang.brigadier.suggestion.SuggestionProvider
<CommandSourceStack> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
disablePack
(CommandSourceStack pSource, Pack pPack) Disables the given pack.private static int
enablePack
(CommandSourceStack pSource, Pack pPack, DataPackCommand.Inserter pPriorityCallback) Enables the given pack.private static Pack
getPack
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_136816_, String p_136817_, boolean p_136818_) private static int
listAvailablePacks
(CommandSourceStack pSource) Sends a list of available packs to the user.private static int
listEnabledPacks
(CommandSourceStack pSource) Sends a list of enabled packs to the user.private static int
listPacks
(CommandSourceStack pSource) Sends a list of both enabled and available packs to the user.static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_136809_)
-
Field Details
-
ERROR_UNKNOWN_PACK
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_UNKNOWN_PACK -
ERROR_PACK_ALREADY_ENABLED
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_PACK_ALREADY_ENABLED -
ERROR_PACK_ALREADY_DISABLED
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_PACK_ALREADY_DISABLED -
ERROR_CANNOT_DISABLE_FEATURE
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_CANNOT_DISABLE_FEATURE -
ERROR_PACK_FEATURES_NOT_ENABLED
private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_PACK_FEATURES_NOT_ENABLED -
SELECTED_PACKS
private static final com.mojang.brigadier.suggestion.SuggestionProvider<CommandSourceStack> SELECTED_PACKS -
UNSELECTED_PACKS
private static final com.mojang.brigadier.suggestion.SuggestionProvider<CommandSourceStack> UNSELECTED_PACKS
-
-
Constructor Details
-
DataPackCommand
public DataPackCommand()
-
-
Method Details
-
register
-
enablePack
private static int enablePack(CommandSourceStack pSource, Pack pPack, DataPackCommand.Inserter pPriorityCallback) throws com.mojang.brigadier.exceptions.CommandSyntaxException Enables the given pack.- Returns:
- The number of packs that are loaded after this operation.
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
disablePack
Disables the given pack.- Returns:
- The number of packs that are loaded after this operation.
-
listPacks
Sends a list of both enabled and available packs to the user.- Returns:
- The total number of packs.
-
listAvailablePacks
Sends a list of available packs to the user.- Returns:
- The number of available packs.
-
listEnabledPacks
Sends a list of enabled packs to the user.- Returns:
- The number of enabled packs.
-
getPack
private static Pack getPack(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_136816_, String p_136817_, boolean p_136818_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-