SpongeAPI icon indicating copy to clipboard operation
SpongeAPI copied to clipboard

Expose ArgumentReader#skip()

Open MrSlimeDiamond opened this issue 7 months ago • 4 comments

Sponge | SpongeAPI

MrSlimeDiamond avatar May 28 '25 09:05 MrSlimeDiamond

This should follow the convention we already use for the other skip methods, so skipChar. You most likely also want to couple this with peekChar to have this to be more usably.

I'm also not opposed to just have a method to set the cursor position directly.

aromaa avatar Jun 09 '25 15:06 aromaa

It looks like there's already an ArgumentReader#peekCharacter method, but Mutable's methods use a char suffix instead of character. (for example parseChar). Perhaps this should be made consistent?

I'm happy to rename it to skipChar, but this means I'd need to open a PR to Sponge

MrSlimeDiamond avatar Jun 10 '25 01:06 MrSlimeDiamond

Sigh, there's also peekString inside the Mutable instead of being in the base interface which I was glancing at for other similar functions. We can't accept breaking changes in 12 so that shouldn't be done here. Let's just rename it to skipChar to keep it consistent with the Mutable inteface.

aromaa avatar Jun 10 '25 12:06 aromaa

@aromaa Updated, there's now a Sponge PR to implement this

MrSlimeDiamond avatar Jun 11 '25 05:06 MrSlimeDiamond