setWrap

public abstract ItemStack setWrap(Wrap wrap, ItemStack target, boolean physical, Player player)

Wrap an item. If giveBack is true, the item is currently physically wrapped and the physical wrap was configured to give it back, it will also give the player the wrapper of the old wrap.

Return

The newly wrapped item

Parameters

wrap

The wrap to apply, if null, the item will be unwrapped

target

The item to apply the wrap to

physical

If the wrap was added physically

player

The player