I'm coding a portal and when I have to teleport the player (in the onEntityCollision method) I get the world with MinecraftServer#getWorld(Key)
entity.moveToWorld(world.getServer().getWorld(LIBRARY_WORLD_KEY));
I'm getting a very big error that doesnt seem to be of any use (attached)
Yes I am only executing this on the server
Yes I am checking if the entity can use portals