set_pinv() Version 1.8 problem
LadyCailinBot opened this issue ยท 4 comments
CMDHELPER-3042 - Reported by Mario
set_pinv(player(),array(1: array(type: '58', qty: 1))) work
set_pinv(player(),array(1: array(type: 'crafting_table', qty: 1)))
CastException Expecting an integer, but received "crafting_table" instead
Comment by PseudoKnight
That is correct behavior. It expects an integer for 'type', but you gave it a string instead. You can use the 'name' index instead of 'type' if you want to specify the Bukkit material name. Or you can use data_name('craftingtable') to return a 'type' for the specified item alias. It is usually better to use the 'name' index, though.
eg. set_pinv(player(), array(1: array(name: 'WORKBENCH', qty: 1)));
Comment by Mario
set_pinv(player(),array(1: array(name: 'portal', qty: 1)))
It don't add a Portal ?!