Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When /mw tp: "java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Long" #67

Open
danielabarrett opened this issue Jun 5, 2024 · 1 comment

Comments

@danielabarrett
Copy link

Running Forge 1.19.4 with a few other mods on a server. I have about 8 worlds added using multiworld. Twice now, I've had a world that, when I try to tp to it I get a ClassCastException in the console and do not get teleported. The whole error is included below. I haven't been able to find anything that causes this but once it happens to a world it keeps happening to the same world until I delete it from the server files including level.dat.

Otherwise though I've had no problems at all. Good job bro, sweet mod.
.
.
.
.
java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Long (java.lang.Integer and java.lang.Long are in module java.base of loader 'bootstrap')
at TRANSFORMER/[email protected]/me.isaiah.multiworld.config.Configuration.getLong(Configuration.java:70)
at TRANSFORMER/[email protected]/me.isaiah.multiworld.command.SpawnCommand.getSpawn(SpawnCommand.java:58)
at TRANSFORMER/[email protected]/me.isaiah.multiworld.command.TpCommand.run(TpCommand.java:35)
at TRANSFORMER/[email protected]/me.isaiah.multiworld.MultiworldMod.broadcast(MultiworldMod.java:186)
at TRANSFORMER/[email protected]/me.isaiah.multiworld.MultiworldMod.lambda$register_commands$2(MultiworldMod.java:117)
at MC-BOOTSTRAP/[email protected]/com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:263)
at TRANSFORMER/[email protected]/net.minecraft.commands.Commands.m_242674_(Commands.java:255)
at TRANSFORMER/[email protected]/net.minecraft.server.network.ServerGamePacketListenerImpl.m_246958_(ServerGamePacketListenerImpl.java:1239)
at TRANSFORMER/[email protected]/net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$12(ServerGamePacketListenerImpl.java:1216)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_18693_(BlockableEventLoop.java:67)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at TRANSFORMER/[email protected]/net.minecraft.server.TickTask.run(TickTask.java:18)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:156)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:773)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:162)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:130)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:756)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:750)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:139)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:736)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:668)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:252)
at java.base/java.lang.Thread.run(Thread.java:833)

@danielabarrett
Copy link
Author

This could be the fix at Multiworld-Common/src/main/java/me/isaiah/multiworld/config/Configuration.java:70
https://stackoverflow.com/questions/58056944/java-lang-integer-cannot-be-cast-to-java-lang-long

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant