Updated to work with latest versions of Java Plugin SDK