Class ReplaceItemCommand

java.lang.Object
net.minecraft.server.command.ReplaceItemCommand

public class ReplaceItemCommand
extends Object
  • Field Details

    • BLOCK_FAILED_EXCEPTION

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType BLOCK_FAILED_EXCEPTION
    • SLOT_INAPPLICABLE_EXCEPTION

      public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType SLOT_INAPPLICABLE_EXCEPTION
    • ENTITY_FAILED_EXCEPTION

      public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ENTITY_FAILED_EXCEPTION
  • Constructor Details

    • ReplaceItemCommand

      public ReplaceItemCommand()
  • Method Details

    • register

      public static void register​(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher)
    • executeBlock

      private static int executeBlock​(ServerCommandSource source, BlockPos pos, int slot, ItemStack item) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • executeEntity

      private static int executeEntity​(ServerCommandSource source, Collection<? extends Entity> targets, int slot, ItemStack item)