PySpigot icon

PySpigot -----

A Python scripting engine for your Minecraft server.



Description
PySpigot is a Python scripting engine for your Minecraft server. It allows you to create scripts, which act as "mini-plugins": they can register event listeners, commands, schedule tasks, and more!

PySpigot is a lot like Skript, but much more powerful. PySpigot utilizes Jython, a Python implementation that runs entirely on Java. This means that PySpigot scripts have full access to the entire Bukkit/Spigot API, as well as APIs of any other loaded plugins. In general, a PySpigot script can do anything Python can do, and anything a plugin can do as well.

Currently supports Spigot and Paper, on 1.16 and newer. I plan to add BungeeCord/Waterfall/Velocity support in the future.

Runs on Java version 17 and above.

For complete documentation on the plugin and writing scripts, visit https://pyspigot-docs.magicmq.dev.


For support, and to stay in the loop regarding updates, join the official Discord: https://discord.gg/f2u7nzRwuk

Features
  • Load scripts on server start and via commands
  • Stop, reload, and unload server scripts via commands
  • Register event listeners
  • Register commands
  • Schedule tasks (synchronous and asynchronous)
  • Work with config files
  • Register ProtocolLib packet listeners
  • Register PlaceholderAPI placeholder expansions
  • Comprehensive logging of errors and exceptions on a per-script basis, to file
  • Load Java libraries you'd like to work with at runtime
  • Write scripts in Python syntax
  • Scripts have complete access to the Bukkit/Spigot API, as well as APIs of other plugins, so anything is possible.
  • Support for working with SQL, Mongo, and redis servers
  • And more!
Commands
/pyspigot help: List some useful links (Documentation, Discord, etc.)
/pyspigot info <scriptname>: Displays detailed information about a script, including uptime, registered listeners, commands, and more info
/pyspigot listscripts: List loaded and unloaded scripts
/pyspigot load <scriptname>: Load a script with the given name
/pyspigot loadlibrary <libraryname>: Load a Java library with the given name
/pyspigot reloadall: Reload the entire plugin, including scripts, libraries, and config
/pyspigot reload <scriptname>: Reload a loaded script
/pyspigot reloadconfig: Reload PySpigot's config.yml
/pyspigot unload <scriptname>: Unload a script

Configuration
Code (YAML):
# If false, will disable collection of metrics information by bStats for PySpigot. You may also disable bStats server-wide in the bStats config.yml under /plugins/bStats.
metrics-enabled
: true
# The delay for loading scripts (in ticks) after the server finishes loading.
script-load-delay
: 20
# List of relocation rules for libraries in the libs folder. Format as <pattern>|<relocated pattern>
library-relocations
: [ ]
# Date/time format for timestamps in script log files, written in Java's SimpleDateFormat pattern: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/format/DateTimeFormatter.html
log-timestamp-format
: 'MMM dd yyyy HH:mm:ss'
# If true, will print log messages to console every time a script is loaded, run, and unloaded.
script-action-logging
: true
# If true, will log all redis events to the console and to a script's logger. If false, will only log reconnect events (reconnect attempts and failures)
verbose-redis-logging
: true
# If true, scripts will be automatically unloaded if a plugin the script depends on is unloaded. This is especially useful to ensure script shutdown tasks that require a depending plugin complete successfully (prior to the plugin being unloaded).
script-unload-on-plugin-disable
: true
# Default values for script options. If one or more options are not defined in the script_options.yml for the script, then PySpigot will fall back to these values.
script-option-defaults
:
  # Whether the script is enabled
  enabled
: true
  # A list of other scripts the script depends on
  load-priority
: 1
  # A list of plugins the script depends on
  plugin-depend
: [ ]
  # Whether script log messages should be logged to its respective log file
  file-logging-enabled
: true
  # The minimum level to log to the console and to the script's log file
  min-logging-level
: 'INFO'
  # The default permission level for permissions
  permission-default
: 'op'
# Advanced debug options for scripts
debug-options
:
  # If true, will print stack traces for all script-related exceptions to the server console
  print-stack-traces
: false
  # If true, the plugin will show messages in console and on join (to players with the permission pyspigot.admin) when a newer version of PySpigot is available to download on spigotmc.org.
  show-update-messages
: true
  # If false, the pyspigot.py file will *not* be automatically replaced with the most recent version (from the pyspigot JAR) on server start if a change is detected. It is recommended to keep this enabled in the event a plugin update comes with an updated pyspigot.py file.
  auto-pyspigot-lib-update-enabled
: true
messages
:
  plugin-prefix
: '&8 [&6PySpigot&8 ] &r'
 


Some Helpful Links
Resource Information
Author:
----------
Total Downloads: 1,500
First Release: Jul 5, 2023
Last Update: Dec 17, 2024
Category: ---------------
All-Time Rating:
8 ratings
Find more info at pyspigot-docs.magicmq.dev...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings