Closed ChrisWard316 closed 4 years ago
I believe that colors, bold, and other things can affect the name. Can you try without any of that?
I have figured it out:
when you use the give command and the item NAME has capitals in it (R and G in this instance) the placeholder doesn't work no matter what if you put capitals in the placeholder nameequals check or not:
The command has to be the following with no capitals in the name: give chris_61 prismarine_shard{display:{Name:"[{\"text\":\"♆ rare gem ♆\",\"italic\":false}]"},Enchantments:[{id:"vanishing_curse",lvl:1}]} 1
and the placeholder doesn't matter if it has caps or not it will still find the item: /papi parse me %checkitem_nameequals:♆ rare gem ♆% /papi parse me %checkitem_nameequals:♆ Rare Gem ♆%
both of these return yes
but the second you put a capital R and G in the name the placeholders don't work.
So going back to my original command with BOLD and grey now works ( as long as the give command has lowercase R for rare and G for gem ) /minecraft:give chris_61 prismarine_shard{display:{Name:"[{\"text\":\"♆ rare gem ♆\",\"italic\":false,\"color\":\"dark_gray\",\"bold\":true}]"},Enchantments:[{id:"vanishing_curse",lvl:1}]}
/papi parse me %checkitem_nameequals:&8&l♆ rare gem ♆%
Which kind of sucks as the items i give to people won't look as nice but it'll do until you can fix the issue
This is looking like it's leading onto my second github issue for example:
i get an enchanted book out my creative inventory and run this command: /papi parse me %checkitem_nameequals:Enchanted Book%
It returns no but if i stick it in an anvil and rename it to enchanted book (no capitals) the above returns yes. I'm guessing its also the same as to why it won't pick up Enchantments on items as minecraft adds capitals to the start of the names.
Very confused as it directly uses the name and the information provided to check without modifying it. I will give this a test though.
Only thing I see in the code is that if the item doesn't have a display name it returns false. I don't believe items by default don't have a display name. (The enchanted book)
Alrighty I just found line 220 which sets all args to lowercase... I'm gonna work on fixing this hopefully soon.
Issue fixed in v1.7.1. Looking into #10 for release of v1.7.2
Excellent can’t wait to test it , do you have an eta on the 1.7.1
Hello i was using check item for a while and i noticed you had an enchant option so i done /papi ecloud download checkitem to get the latest update:
%checkitem_mat:prismarine_shard,namecontains:♆ Rare Gem ♆,amt:3%
My item: /minecraft:give chris_61 prismarine_shard{display:{Name:"[{\"text\":\"♆ Rare Gem ♆\",\"italic\":false,\"color\":\"dark_gray\",\"bold\":true}]"},Enchantments:[{id:"vanishing_curse",lvl:1}]}
the placeholder doesn't work and it used to, ive narrowed it down to the spaces in the namecontains because if you do : %checkitem_mat:prismarine_shard,namecontains:♆,amt:3% it finds it but i cant do SPACE rare gem.
PlaceholderAPI 2.10.6 Paper-284