Autoclose message file input stream
Use getDataFile(...) instead of new File(getDataFolder(), ...)
Use instanceof check instead of catching ClassCastException
Make utility methods static