Minor fixes

Tidy up a JNI function by using MCJavaStringToStringRef and remove an un-neccessary check for empty names.