Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extension methods/properties to Kotlin types for creating Nbt versions of a type. #27

Open
Ayfri opened this issue Mar 16, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Ayfri
Copy link

Ayfri commented Mar 16, 2023

Some utility methods/properties could be added on kotlin classes to simplify creation of Nbt types.
I actually have some methods listed in the examples on some projects and I use them often.

Exemples :

  • "test".nbt to transform a String to a NbtString.
  • true.asNbtByte() to transform a Boolean to a NbtByte.
  • listOf(1, 2, 3).asNbtList() to transform a List of Number to the NbtList version, maybe to the Nbt[Number]Array version when possible.
@BenWoodworth BenWoodworth added the enhancement New feature or request label Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants