SpongePowered / SpongeAPI

A Minecraft plugin API
http://www.spongepowered.org/
MIT License
1.14k stars 342 forks source link

Add method to retrieve level name from world properties #2419

Closed bloodmc closed 2 years ago

bloodmc commented 2 years ago

Major SpongeAPI version

8

Is this likely to be a breaking change?

No

What are you requesting?

Currently, the only way to retrieve a world's level name is via

world.directory().getParent().getFileName();

This isn't ideal as it requires the world to be loaded. I am requesting the ability to retrieve a world's level name from NBT to support legacy world data. Ideally the method should be placed in WorldProperties to support unloaded worlds.