This can be updated to use MCJavaStringToStringRef as mentioned previously (should make things a little neater :))