Skip to content

v0.5.0

Compare
Choose a tag to compare
@github-actions github-actions released this 03 Apr 20:16
· 114 commits to master since this release

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 (including script_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 to java-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.