Package net.minecraft.server.commands
Class ClearInventoryCommands
java.lang.Object
net.minecraft.server.commands.ClearInventoryCommands
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
clearInventory
(CommandSourceStack source, Collection<ServerPlayer> targetPlayers, Predicate<ItemStack> itemPredicate, int maxCount) private static int
clearUnlimited
(CommandSourceStack source, Collection<ServerPlayer> targets, Predicate<ItemStack> filter) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context)
-
Field Details
-
ERROR_SINGLE
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_SINGLE -
ERROR_MULTIPLE
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_MULTIPLE
-
-
Constructor Details
-
ClearInventoryCommands
public ClearInventoryCommands()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) -
clearUnlimited
private static int clearUnlimited(CommandSourceStack source, Collection<ServerPlayer> targets, Predicate<ItemStack> filter) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
clearInventory
private static int clearInventory(CommandSourceStack source, Collection<ServerPlayer> targetPlayers, Predicate<ItemStack> itemPredicate, int maxCount) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-