The Simple MMO World 2 example comes with an Extension provided in two versions: Java and JavaScript (SimpleMMO2 and SimpleMMO2-JS respectively). The two versions are contained in the "deploy/extensions/" folder.
You can choose which one to use by enabling the corresponding configuration in the Zone configuration file under "deploy/zones/".
The source code of the Java Extension is available in the "source" folder.