rutgerkok / WorldGeneratorApi

Minecraft Spigot plugin that enables other plugins to customize world generation
MIT License
95 stars 9 forks source link

Incompatibility with multiworld plugins (such as Multiverse) #1

Closed Uziskull closed 6 years ago

Uziskull commented 6 years ago

It seems that any generator that uses this API is unable to be used more than once in plugins that allow for multiple worlds to be created, such as Multiverse.

After digging around the source a bit (ended up manually updating this plugin to the latest Minecraft release), it seems the problem has to do with the way WorldGeneratorAPI injects itself into the default world generator. When a plugin like Multiverse generates another world with the same generator, it ends up triggering an IllegalArgumentException claiming the world was already assigned to a world generator.

Would it be possible to make WorldGeneratorAPI's generators work with multiworld plugins?

rutgerkok commented 6 years ago

Should now be fixed! Thanks. You'll need to compile the API yourself for now.

The problem was actually that the Bukkit.createWorld API requests plugins multiple times to provide a world generator for the same world. WorldGeneratorApi didn't like this.

I didn't expect there to already be interest in this AP! If you are missing something in the API, or have a question, please open an issue here, and we can discuss it.