Added java-api module. Rewored plugin client to use java-api.