Just as title says. I don’t believe it is possible to do this but if it is let me know.
This is needed for a bukkit (minecraft server) plugin I’m writing. I want to take a command: tnt [power]. Where power is the string returned that I want to convert to float.
Thanks
Use
Float.valueOf(String)to do the conversion.The difference between
valueOf()andparseFloat()is only the return. Use the former if you want aFloat(object) and the latter if you want thefloatnumber.