Set Item

Replaces the item in the target slot by the item you specify

/goop nbt setItem <player> <slot> {filter} [[±]<value>[%]]

Uses a GooP Item Filter, however, the enchantment filter is unsupported because it makes no sense in this context.

Args Breakdown (What everything does)

<Player>

  • Player whose inventory items' NBT will be edited.

  • Supports a few vanilla selectors.

  • [1.6.5] May be an Entity (dropped item) UUID

<Slot>

  • The slot in the player's inventory in which items will be transmutated. To read on slots see Inventory Slots.

  • Examples: mainhand, offhand, chest, feet, any, 0-8, ec*

{Filter}

  • Specify what NBT the item that will be set in that slot by the use of a GooP Item Filter.

  • Always three words long.

[[±]<value>[%]]

  • The operation to apply to the amount of the item. See Plus Minus Percent page for full explanation.

  • Default is 1, setting one item of that type in the target slot.

Tips

  • If there already was an item in the target slot, it will be lost.

    • The only information of it that may be left is its amount. See the point below.


  • You may convert already existing items into a new item by setting the operation to +0

    • This will keep the original amount, so none will be lost

Simple Examples:

/goop nbt setItem cln89 head m ARMOR SKELETAL_HELMET

Equips cln89 wih a skeletal helmet MMOItem


/goop nbt setItem %player% %provided-slot% m MATERIAL WEAPON_POWDER 2

Suppose its put as the OnApply Command of a MMOItem with a MeleeWeapns OnApply Mask, it acts as an item crusher that gives specifically two weapon powder per crushing, and must be used on Melee MMOItem weapons. May be better or worse than the alternative in your server. It wont respect tiers though, if you want to hook it up to tiers you'll need a MythicSkill (you can find this example in Get Tier page).