After careful consideration and due to limited usage, we’ve made the decision to discontinue the PaperMC forums. Moving forward, we recommend using Hangar for plugin uploads, and for all other community discussions and support, please join us on Discord.
What are you trying to achieve exactly (might be an XY problem). Regardless, I would say if your storing something like a list of strings then store the list as a single string with a delimiter. Storing something like an object seems overkill for PDC but you could store each property into multiple data containers.
What are you trying to achieve exactly (might be an XY problem). Regardless, I would say if your storing something like a list of strings then store the list as a single string with a delimiter. Storing something like an object seems overkill for PDC but you could store each property into multiple data containers.
I am trying to add multiple effect to my item, I have wrote a custom potion api to make my own potion. I stored the potion's effect type into the PDC as a String, and it can only store one string, but I want a list of string so that I can add two or more effect into one potion. So I wonder if I can store some object in the PDC to make something more interesting and flexible.
You can store a byte[], in which you can encode whatever date you want into there, generally you'd do a length prefixed array, and then length prefixed strings to simulate a String[], then there's also "just store json", etc
What are you trying to achieve exactly (might be an XY problem). Regardless, I would say if your storing something like a list of strings then store the list as a single string with a delimiter. Storing something like an object seems overkill for PDC but you could store each property into multiple data containers.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.