Pretty basic question really, i want to make a plugin that pretty much perfectly mimics minecrafts /give commands, but adds permission nodes for nbt and giving to others.
I am using google GSON to serializing the last group of the argument (not how it’s done, but subjectively it’s an improvement to not have accidental spaces make the command invalid) and i have gotten it to work mostly, except for stuff that is a boolean or integer, has a b appended to the end, it is expressed as 1b, or so. now, i could just ommit the b and it would work, but i wanted commands that would work in vanilla to work for this aswell
I was thinking of using a regex pattern like “^(/d+)b$” and omitting the data using a recursive function (I actually already wrote one that works well before discovering DataFormats.JSON.read(), Oof)
Is there any better ways of doing this, though? like, can i just straight up turn the string to nbt, or am i parsing it wrongly which is why the b’s remain?