Forked from: https://github.com/electronstudio/python-minecraft-plugin
At the moment this is a proof of concept to pass values from Java to Python with use of GraalVM.
Added function to SamplePlugin.java
to call Python function, passing a string.
-
Install GraalVM: https://www.graalvm.org/docs/getting-started/linux
-
Install Python for GraalVM: https://www.graalvm.org/docs/getting-started/#running-python
gu install python
-
Download PaperMC minecraft server (fork of Spigot): https://papermc.io/downloads
-
Check that you can run PaperMC using GraalVM
~java -jar paper-*.jar
-
Compile the sample plugin:
./gradlew jar
-
Copy the generated plugin jar into the plugins folder of PaperMC.
cp build/libs/*.jar ~/papermc/plugins/
-
Run PaperMC