# Getting Started ## Dependencies - FirstSpirit installation - OpenJDK11 (On Windows this gets installed together with FS `C:/Users//.firstspirit/FSLauncher/jre/11.0.11/jre-win/jdk-11.0.11+9-jre/bin/java.exe`) - AspectJ https://www.eclipse.org/aspectj/ (already included) - copy `.firstspirit/FSLauncher/jar/*`, `.firstspirit_/jars/*` (usually located in $HOME) of the FS installation into `lib/` - Fix some FirstSpirit crap: open ## Paths - `` point to your (or FSs) OpenJDK11 installation - `` can be found in `FSHook/tool` - `` points to `lib/*` and `tool/*` - The seperator is `:` on Linux and `;` on Windows. ## Building ``` java -cp org.aspectj.tools.ajc.Main -sourceroots 'src/' -injars lib/fs-isolated-client-*.jar -outjar bin/uploadPlugin.jar -outxml -9 -Xlintfile .vscode/ajc.properties", ``` ## What the hell? AspectJ is a bytecode manipulation framework. In our case the method `Plugins.getPlugins(ServerConnection, Class, BaseContext)` from `de.espirit.firstspirit.client.plugin.Plugins` gets overriden to load the plugins registered in `com.kallendorf.fshook.CustomLoader.pluginsToLoad` in addition to the default ones. This allows th execution of arbitrary code within the FirstSprit client.