LandlordPlugin/LandLord

Make use of WorldEdit for item types/block types

Opened this issue · 0 comments

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.