About
Scripts are plain Python files in the server's plugin folder. A script declares a command or an event, and the rest of the file runs when someone uses the command or the event happens.
What it does
- Command patterns like
/gift {player} {item} [amount]with required and optional arguments - Events such as
join,breakandplace, like Skript'son join: /pymc reload <script>checks the script and tells you exactly which line is wrong- Runs with the machine's Python, or with GraalPy inside the server's own JVM when Python is not installed
Requirements
- Paper 1.21 or newer
- Java 21 or newer
- Optional: Python 3.9+ on the host. Without it, GraalPy is downloaded once on first start (about 150 MB)
Install
- Drop
PyMC-3.0.0-alpha.jarintoplugins/of your Paper server and start it. - Put scripts into
plugins/PyMC/scripts/, then run/pymc reload.
plugins/PyMC/scripts/gift.py
from pymc import mcmod, mccommand
mcmod.triggerCommand("/gift {player} {item} [amount]")
mccommand.execute.console(f"/give {player} {item} {amount or 1}")
mccommand.broadcast(f"&6{mcmod.sender} gave {player} some {item}")PyMC is in alpha, so things can still change.