Releases: magicmq/pyspigot
Releases · magicmq/pyspigot
v0.7.1
Additions in this version:
- Added a
CustomEvent
that can be created and called by scripts to signal a custom event to other scripts/plugins (91dd572, 267842d, a7beaf9) - Added another example script (1a3b400)
Changes in this version:
- Minor improvements to config file comments and JavaDocs (3bcb83f, 2fc00e0, e52a6c6)
- Minor code cleanup (e95c3ca)
- Updated all dependencies to latest versions (f5b363d, 15f1ab7)
Bugs fixed in this version:
v0.7.0
Additions in this version:
- Added the database manager to work with SQL and Mongo database servers (07f435b, c6d8a64, 4f7feb4, d270d77, d692ed2, f32f25b, b9578e5, cd80dfb, 4096e0f, e407a7f, 78f2c3a)
- Added the redis manager to work with redis servers (f472efb, 1d493ab, 0dfc51b, f32f25b, b9578e5, cd80dfb, f26bbe2, a27572c, b4a77c3, d229fdb, 2204b84, fb285d6, 3d303e8, c0ae161)
- Added a new
SyncCallbackTask
task type to the task manager (ff70796) - Added support for creation of subfolders within the
scripts
folder for better organization of scripts (e627c55) - Added support for creation of subfolders within the
configs
folder for better organization of config files (e8788af, 834cab1) - Added
doesConfigExist
anddeleteConfig
functions to config manager (e8788af) - Added ability to define script permissions in the
script_options.yml
file (1f5c240, 2e960d3, 8f1ef44, acbfd92) - Added ability to specify plugin dependencies in the
script_options.yml
file (56046b0) - Add ability to specify config defaults when working with the config manager (a0c78f8)
- Added
reload
function to script config object (a0c78f8) - Added ability to specify default script options in the
config.yml
(16da697) - Added official support for Minecraft version 1.21 (7509994, 0c12677)
Changes in this version:
- Using
print
in a script now redirects the message to the script's logger and tags the log message with the script name in the server console (fab6573, 7e58d6a, bd3346e) - The script manager now returns a run result (
RunResult.FAIL_SCRIPT_NOT_FOUND
) instead of throwing aFileNotFoundException
when attempting to load a script that doesn't exist (2745a20) - Scripts are now automatically unloaded if a plugin the script depends on is unloaded. This can be disabled by setting
script-unload-on-plugin-disable
tofalse
in theconfig.yml
(d2021ce) - Changed the script dependency system to a load priority system. Scripts are now assigned a load priority (
load-priority
in thescript_options.yml
), with higher load priorities loading first, and lower load priorities loading later (e412613) - The
suppress-update-messages
value in theconfig.yml
has been changed toshow-update-messages
, and the default value is nowtrue
instead offalse
(01c2d46) - Minor improvements in error logging (2a63de5)
- Added additional aliases to some commands (2e3ee65, 691a941)
- The
reloadConfig
function in the config manager has been deprecated in favor of thereload
function within the script config, and configs are now automatically reloaded after callingsave
. Please see the documentation for more details (a0c78f8) - A lot of code cleanup/optimization (many commits)
- JavaDocs improvements (many commits)
Bugs fixed in this version:
- Fixed broken link when pinging Spigot for latest available plugin version (0739c1d)
- Fix error when using
/pyspigot info
if ProtocolLib and/or PlaceholderAPI are not present on the server (c97ad16) - Fixed some dependencies not being properly relocated in the final pyspigot JAR file (a2d821b)
- Fixed error when fetching
config.yml
default values (a9ff117) - Fixed broken Minecraft version parsing for versions newer than 1.20 (7509994, 0c12677)
- Fixed an error that would occur if attempting to unload active objects from a manager class in the
stop
function of a script (27f0e96) - Fixed an endless loop that would occur if an exception was thrown inside of a script's event listener when listening to
ScriptExceptionEvent
(1a27ab6) - Fixed a bug where changes to a config upon using the
set
function were not reflected unless if a config was reloaded manually (a0c78f8) - Fixed a bug where the plugin would not display chat messages correctly on MC versions older than 1.16 (966a1ec)
v0.6.0
Additions in this version:
- Added the
/pyspigot info
command, which displays various information about a script (5c7b440) - Wrote automated system to update the
pyspigot.py
library if any changes were detected, including a config option to disable this feature if desired (e89aa61) - Various JavaDocs additions (9223770, 36d6bd7)
Changes in this version:
- Project is now compiled with JDK 17, which means that going forward, it will only work on Java 17+ (9865916)
- PySpigot now checks if a script file exists before performing any load tasks (fb8cc4f)
- The
/pyspigot reload
command now functions more like the/pyspigot load
command for ease of use (54a3413) - The
ScriptManager#getAllScripts
method was renamed toScriptManager#getAllScriptNames
for clarity (35794b0) - Various code quality improvements, including partial rewrite of command registration/unregistration system (32850fd, 7d65bb7)
Bugs fixed in this version:
- Fixed a bug where an error would occur when calling the pyspigot module if ProtocolLib and/or PlaceholderAPI were not running on the server (9e36be9)
- Fixed a bug where a subclass event listener would be called if a superclass event of the listener fired (0f6e7f4)
- Fixed a bug where directories within the plugin folder were not created on first run of the plugin (33efc85)
- Fixed a bug where an error would occur on script unload if the script's handler was never initialized (057e0f0)
- Fixed a bug within an example script (b8d6cd3)
v0.5.0
Additions in this version:
- Added script options, which are user-defined options that pertain to each script, this also includes the addition of the
script_options.yml
config file (ac27ba4) - Added an
enabled
option to disable scripts (via script options) (28f6ab2) - Added dependency management for scripts (via script options) (eb48d97)
- Added per-script logging options (via script options) (db8e028)
- Exposed the ScriptManager to scripts (via the PySpigot class), which enables scripts to load/unload other scripts (c3c515e)
- When loading a script, the ScriptManager returns a more detailed response (
RunResult
) which specifies the reslult of a load operation (fad95c0) - Added console log messages for each script when it is loaded/unloaded (can be disabled by a new value in the
config.yml
,script-action-logging
) (95c2b30) - Added a
/pyspigot reloadall
command, which reloads the config (includingscript_options.yml
), the LibraryManager, and all scripts (657d5ed) - Added ability to import external Python modules into scripts, including the addition of the
python-libs
folder, where Python modules go (64ba278) - Added several more example scripts to the GitHub repository (a9588c0)
- Added the
pyspigot.py
helper module to make accessing PySpigot managers easier (e740eb3, 2ccb320) - Added ability to pass arguments to functions called by a synchronous or asynchronous task (2e94374)
Changes in this version:
- Removed assignment of global variables system to
globals
variable within each script. See the documentation on how to access the global variables system (6ea1d54) - Cleaned up and improved command messages (f664968, 40241a8, 7968fa5)
- Changed the parent class loader for the LibraryManager class loader (should now be the class loader assigned to PySpigot by Bukkit) (89245f6)
- Partial rewrite of the ScriptManager, which includes code cleanup as well as combining script loading and running into a single load phase (64ba278)
- ScriptRunEvent no longer exists in favor of a single-phase load operation for scripts
- The global variables system was rewritten and is now its own singleton class, with wrapper methods (f28a852)
- bStats now collects data on total number of scripts in the scripts folder as well as number of running scripts and displays these statistics as a pie chart. Also removed the
using-spigot
statistic (a77c798) libs
folder (where external Java libraries go) renamed tojava-libs
(89245f6)- A lot of code reorganization/cleanup in several areas (many commits)
- Use HashMap instead of List in manager classes for improved performance when accessing (df0711b)
- Managers now use a more efficient/performant method of caching and retrieving active script listeners, commands, tasks, etc. (df0711b)
- Error messages from tasks now display the task ID in the error output (8c0182d)
Bugs fixed in this version:
- Fixed script error/log messages printing the identifier ([PySpigot/script.py]) twice (8d3f803)
- PySpigot now properly cleans up Jython resources on script unload (67b9d3c, 80fba08, 64ba278)
- Fixed an error that would occur if a script unregisters its own listeners, commands, etc. in the
stop()
function (091d63e) - Fixed issue where bStats metrics were not shut down on plugin unload (a77c798)
- Fixed
/pyspigot reloadconfig
command printing usage message (68a767e) - Fixed broken JAR relocation for Java libraries (65589af)
- Fixed incorrect logging of non-ASCII characters to script log files (71685cf)
- Fix update notification system performing I/O operations on main server thread (03a66c6)
- Improved thread safety of TaskManager (e4c1adf)
There are several other very minor changes, fixes, and additions. Please see the commit history for a full list.
v0.4.0
Additions in this version:
- Script commands are now added to the server-wide help menu (/help) (778bd86)
- Added
/pyspigot help
command to display useful links (Documentation, Discord, etc.) (e7f684b) - Added a notification that is displayed to the console and to admins on login to notify when running an outdated version of PySpigot (b680c32)
Changes in this version:
- No changes in this version :)
Bugs fixed in this version:
v0.3.1
v0.3.0
Additions in this version:
- Added Metrics (bStats), along with config option to enable/disable metrics,
metrics-enabled
(38916d5)
Changes in this version:
- ScriptManager now uses a HashSet instead of an ArrayList to cache scripts, to reinforce uniqueness of elements (8d7f2dd)
- Method access (via reflection) is checked on plugin load, and plugin is disabled if checks fail, to prevent problems with scripts further down the line. (447362e)
- Minor API changes:
ScriptManager#getLoadedScripts
now returns a Set of Script.ScriptManager#getLoadedScriptNames
returns a set of String. (8d7f2dd)
Bugs fixed in this version:
v0.2.0
This is the initial public release for PySpigot. Full list of features can be viewed at https://pyspigot-docs.magicmq.dev.
Please submit an issue if you encounter any bugs.