The CraftPlayerInventory implementation sends a container_set_slot packet to the client which will error if an invalid slot is passed to the setSlot method, making a validation necessary over simply silently ignoring invalid slot values.
The CraftPlayerInventory implementation sends a container_set_slot packet to the client which will error if an invalid slot is passed to the setSlot method, making a validation necessary over simply silently ignoring invalid slot values.