Open KhrysAK47 opened 2 months ago
It appears to break on every custom item or that has custom name with basic color codes.
try the new version.
try the new version.
The issue still persists. https://pastebin.com/LiEBtmfB
it works on all our tester servers. Does this happen with other Java? (rather than guava you're using?)
Yes, I tried 17 and 21 and both have same problem.
we've tested on all LTS versions and they all worked fine and we could not replicate the error you presented.
this is what we typically gets. The image shows the placeholder showing (returning) the string "1" in response to "/papi parse me %enchantment_FORTUNE_level%".
Did you test with a renamed nether star? With it in hand or equipped? What Java are you running? I will perform one last test in the morning.
Here is the same result with a nether_star with FORTUNE enchant on it and holding it in my hand:
an immutable map object holding the enchantment information, is first copied into a mutable map object before executing the remove operation.
Do you mind sharing your Java version? 17?
we tested with 4 LTS versions java 8, java 11, java 17 and java 21.
It didn't work for me on any of the testings. :( Even blank server
where did you get your java?
I use a hosting provider (SparkedHost) and they add it on server installation.
Can I somehow further debug?
well, your issue is coming from your java and cannot be debugged in the placeholder expansion. The expansion "copies" the map object which stores the enchantments into "mutable" object so that elements can be removed. However, your java implementation seems to be keep using immutable map object.
we confirm the working with the official implementation of Java
BTW, which version of PAPI-Enchantment are you using?
It appears to break on every custom item or that has custom name with basic color codes.
BTW, this expansion is nothing to do with such custom name (including color codes). The exception you encounter is nothing to do with custom names.
If you hold a Nether Star, and do /papi parse me
%enchantment_<any enchant>_level%
It will display this error: