This update contains some major additions (including support for projects), as well as some key bug fixes.
Additions in this version:
- Added support for multi-file script projects! For more information, see the documentation.
- Calling
sys.exit
from within a script now works as intended.
Changes in this version:
- Added back the option to specify default permissions in
script-option-defaults
in theconfig.yml
- Major improvements to exception throwing and handling, including delegation of most exception handling to Jython
- Miscellaneous code and JavaDocs improvements
- Updated many dependencies to their latest versions
Bugs fixed in this version:
- Fixed a bug where PySpigot would not load if the optional dependencies ProtocolLib and/or PlaceholderAPI were not running on the server
- Fixed a bug where color codes were not printing correctly for
/pyspigot listscripts
command messages - Fixed a bug where scripts could desync from their own PySystemState when calling script code at a later time, such as event listeners, tasks, commands, etc.
- Fixed a bug where PySpigot would attempt to shutdown before it was initialized
- Fixed a bug where a script could access a manager before it was initialized
- Fixed a bug where the main server thread would hang on script unload if the script accessed the
threading
module from an asynchronous context by patching the threading module on script unload. This can be disabled by settingdebug-options.patch-threading
tofalse
in theconfig.yml
This release also contains a preliminary release for a BungeeCord-compatible version of PySpigot. This is not an official release because I have not comprehensively tested it. Download it here. Feel free to download, test it out, and report any issues here on GitHub or on Discord.
See the complete change log for this update here: https://github.com/magicmq/pyspigot/releases/tag/v0.9.0
This update contains key bug fixes and performance improvements, as well as some minor additions/changes.
Additions:
- Script
start
andstop
functions now optionally accept one parameter, the script object, which is passed to the functions by PySpigot when they are called - Added support for relational placeholders in script PlaceholderAPI expansions
- Added a new
function.py
helper module, bundled into the PySpigot JAR file, that wraps Java functional inferfaces in a Python-friendly format - Added Jython-specific options to the
config.yml
, including initialization on startup, Jython properties, and args/sys.argv
Changes:
- The
pyspigot.py
helper library is now precompiled and bundled into the/Lib
folder within the PySpigot JAR file. It is no longer copied into thepython-libs
folder. You can safely delete thepyspigot.py
and correspondingpyspigot$py.class
files from the python-libs folder. - The
auto-pyspigot-lib-update-enabled
was removed - Jython is now initialized on server startup/plugin load by default, rather than when loading the first script, which increases performance in most cases
- Updated several example scripts to use the latest recommended PySpigot features
- Reformatted and removed some redudancy from script error messages in console
- The plugin prefix is now hard-coded (no longer defined in the
config.yml
), and the footer was removed from the/pyspigot help
command - Increased precision when reporting Java library load times
- A lot of code cleanup and miscellaneous improvements
- Updated several dependencies to their latest versions
Bug Fixes:
- Fixed an issue where Paper was unnecessarily relocating Jython internals, which resulted in diminished performance
- Fixed an issue where PySpigot managers were being shut down if they weren't initialized first
- The Database manager now specifies default HikariCP properties if none are explicitly defined
This release also contains a preliminary release for a BungeeCord-compatible version of PySpigot. This is not an official release because I have not comprehensively tested it. Download it here. Feel free to test it out and report issues on GitHub or Discord.
See the complete change log for this update here: https://github.com/magicmq/pyspigot/releases/tag/v0.8.0
0.7.1 Update
This update is a minor release, and it only contains one new feature (custom script events) as well some minor bug fixes and code improvements.
The bigger news with this update is that the new documentation site is live! Check it out here.
Additions:
- Added a
CustomEvent
that an be created and called by scripts to signal a custom event to other scripts/plugins (visit the docs for more information) - Added another example script
Changes:
- Updated all dependencies to latest versions (including Jython to 2.7.4)
- Minor code improvements/cleanup
- Minor improvements to config file comments and JavaDocs
Bug Fixes:
- Fixed an issue with log messages not being printed correctly when running regular Spigot server software
- Fixed an issue with the library manager attempting to load non-JAR files and folders
See the complete change log here.