Hm, I tried to get the world name, But always when send the message to me the world name is: "MpServer" equals you said. I don't know how to obtain the WorldInfo instance
The full code:
@SubscribeEvent
public void onPlayerAFK(TickEvent event) {
if (Minecraft.getMinecraft().thePlayer != null) {
World world = Minecraft.getMinecraft().thePlayer.getEntityWorld();
ChatUtil.sendMessage("World name: " + world.getSaveHandler().loadWorldInfo().getWorldName());
}
}
I'm using "TickEvent" to check
I'm trying get the player World name I tryied to use:
World world = Minecraft.getMinecraft().thePlayer.getEntityWorld();
world.getSaveHandler().loadWorldInfo().getWorldName()
But It crash the Minecraft. Have another method to get the world name?
I tried join on server without any mods, and it keep showing this exception. It's okay, now I know it is not my mod that is causing the exception, But maybe it's my Forge? I use Forge: "1.8.9-forge1.8.9-11.15.1.1902-1.8.9" Something wrong with this version?
Thanks.
The Mod has some other classes if you want see I send the link to you, But I think is not the code, Maybe is the Forge version or MC version. But I don't know
Here some class,
https://hastebin.com/mojerejizi.java
https://hastebin.com/tawacapenu.swift
https://hastebin.com/ubuwihaqif.java
https://hastebin.com/zicoqafube.swift