Please not that I would like to do this with code, no configuration files. Their will be a lot of these small servers and it would be a pain for those who manages them to disable all the worlds manually.
These worlds will be created regardless - they are part of Vanilla minecraft and as far as I know there’s no way to prevent this.
However, you can prevent them from ever being loaded (and hence generated) through configs - these can also be changed programmatically through WorldProperties.
You can watch the ConstructWorldEvent and see when a world is first created - you can immediately use setEnabled(false) to prevent it from being loaded from that point onwards.
If it’s about the name, you can rename “world” to whatever you like in the server.properties level-name=
But that’s just for one of those 3 worlds
Just did some testing and ConstructWorldEvent doesn’t seem to get called. @Developers any idea?
I am using spongeforge: 3.1.0-BETA-115. And register the events on GameAboutToStartServerEvent.
It looks implemented tho:
@thomas15v Maybe you’re looking for LoadWorldEvent. I believe ConstructWorldEvent is used when a new world is being created (never generated before).