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

Make use of WorldEdit for item types/block types #21

Open
SirYwell opened this issue Jul 13, 2021 · 0 comments
Open

Make use of WorldEdit for item types/block types #21

SirYwell opened this issue Jul 13, 2021 · 0 comments
Labels
enhancement New feature or request size: large
Milestone

Comments

@SirYwell
Copy link
Member

Spigot and its Material enum are very inflexible and don't represent the how item types and block types are rerpesented in minecraft. There's a lot of bytecode magic going on, relying on the api-version specified in the plugin.yml. That also causes issues with using constants introduced later.

WorldEdit instead provides ItemType and BlockType, (aswell as ItemTypes and BlockTypes, those can be used similar to the Material enum) and methods to simply access them by their name id (like minecraft:stone, the default namespace minecraft can be left out). This way, all names supported by the actual platform are allowed, without depending on weird and inconsistent naming of the Material constants.

Using those types everywhere internally and in the API allows to be more flexible, more modern and future proof (in case of e.g., a paper hard fork, sponge support or whatever could happen).

As this would be a breaking change, I would target it for LandLord 5.0.0.

@SirYwell SirYwell added enhancement New feature or request size: large labels Jul 13, 2021
@rainbowdashlabs rainbowdashlabs added this to the Version 5 milestone Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size: large
Projects
None yet
Development

No branches or pull requests

2 participants