Python quickstart
Create a Python script that greets players when they join your Paper server.
Install the runtime
Install the Rune CLI, then run rune setup from your Paper server folder and start Paper once. Install Python 3 on the server. Set RUNE_PYTHON to its executable path if the server cannot find Python on its PATH.
Create your script
Run these commands from your Paper server directory.
cd plugins/Rune/scripts
rune init python-welcome --language pythonYou can also run rune new python-welcome py in the Paper console to create a script without the CLI.
from rune import broadcast, on
@on("PlayerJoinEvent")
def welcome(event):
player = event["player"]["name"]
broadcast(f"Welcome, {player}!")Load and test it
Edit python-welcome/src/index.py for the CLI scaffold or python-welcome/index.py for the server scaffold. From the Paper console, run rune reload. Join the server to see the welcome message. Restart Paper to register new commands.