Error when loading a world

When I try to load a world with following code:

Optional<World> load = Sponge.getGame().getServer().loadWorld("plots");

I get this error:

Error occurred while executing command ‘world load plots’ for source EntityPlayerMP[‘Hitzk0pf’/260, l=‘world’, x=-1677.95, y=78.12, z=55.31]: null
java.lang.NullPointerException
at net.minecraft.world.storage.WorldInfo.isEnabled(WorldInfo.java:494) ~[bqo.class:?]
at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:641) ~[MinecraftServer.class:?]
at me.Hitzk0pf.CaveCore.commands.World.WorldLoad.process(WorldLoad.java:118) ~[WorldLoad.class:?]
at org.spongepowered.api.command.args.ChildCommandElementExecutor.execute(ChildCommandElementExecutor.java:180) ~[ChildCommandElementExecutor.class:1.8-1577-3.1.0-BETA-1023]
at org.spongepowered.api.command.spec.CommandSpec.process(CommandSpec.java:332) ~[CommandSpec.class:1.8-1577-3.1.0-BETA-1023]
at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:331) ~[SimpleDispatcher.class:1.8-1577-3.1.0-BETA-1023]
at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:252) [SpongeCommandManager.class:1.8-1577-3.1.0-BETA-1023]
at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:83) [cl.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:812) [rj.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:791) [rj.class:?]
at net.minecraft.network.play.client.C01PacketChatMessage.func_180757_a(SourceFile:37) [lu.class:?]
at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(SourceFile:9) [lu.class:?]
at net.minecraft.network.PacketThreadUtil$1.onProcessPacket(SourceFile:110) [ih.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [ih.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_66]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_66]
at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:714) [FMLCommonHandler.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:656) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:364) [po.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:598) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:478) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]

Strange thing: when I want to rename this world → error:

Error occurred while executing command ‘world rename plots plot’ for source EntityPlayerMP[‘Hitzk0pf’/260, l=‘world’, x=-1678.11, y=46.87, z=100.49]: World still loaded
java.lang.IllegalStateException: World still loaded

And when I want to unload it, it says, that there is no world with that name. Can it be, that there is a a wrong information somewhere in my sponge config files?

Any ideas?
Thanks :slightly_smiling:

IDK about the renaming because I haven’t tested it lately but the other error I mentioned here the other day, so I assume it’s being handled.

https://github.com/SpongePowered/SpongeForge/issues/441

1 Like

It’s exactly the same issue, when will they add the pushed “WorldMigrator” class?) :frowning: is there a way to get two bukkit worlds working? I tried it all day long, but could not find a solution…
Thanks :slightly_smiling:

Yes they do care, if you look at the issue it’s clearly been marked as high priority.

1 Like

Yeh, I know, I edited my post a couple minutes ago (I expressed myself poorly) :slightly_smiling:

I wouldn’t say that. They did mark it as a high priority shortly after I posted the error. The only way I’ve found to get bukkit worlds working is to manually create a level_sponge.dat file, which is not a best of ideas because you have to assume the world generator type, and pick a unique dimension id and name. If you do manage to get as far as creating the dat file, the server should load the world automatically assuming the the settings mentioned in the dat file are correct. There’s probably an easier way if you set SpongeCommon and a dependency but I haven’t got into all that. I’d recommend waiting for a a fix because in the end all that extra work will be for nothing anyways

1 Like

As I said in my last post, I didn’t want to say it like I did (so I edited it a few moments after I replied). Thanks for helping out :slightly_smiling:

Fixed the crash