Hello!
I want the name of player's tool
If I try to do
It returns <none> because the item isn't "named" eg. with an anvil
[doublepost=1671881937,1671628679][/doublepost]To anyone who might want this in the future:
I want the name of player's tool
If I try to do
Code:
set {_item} to player's tool
set {_itemName} to name of {_item}
[doublepost=1671881937,1671628679][/doublepost]To anyone who might want this in the future:
Code:
function getItemName(i: item) :: string:
if {_i}'s name is set:
return {_i}'s name
else:
return "%{_i}%"
command /itemname:
trigger:
send getItemName(player's tool)