Skip to content

Releases: magicmq/pyspigot

v0.7.1

17 Dec 19:58
Compare
Choose a tag to compare

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:

Bugs fixed in this version:

  • Fixed issue with log messages not printing correctly when running regular Spigot server software (1f004b3)
  • Fixed issue with library manager attempting to load non-JAR files and folders (76fe4ee)

v0.7.0

19 Aug 20:24
Compare
Choose a tag to compare

Additions in this version:

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 a FileNotFoundException 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 to false in the config.yml (d2021ce)
  • Changed the script dependency system to a load priority system. Scripts are now assigned a load priority (load-priority in the script_options.yml), with higher load priorities loading first, and lower load priorities loading later (e412613)
  • The suppress-update-messages value in the config.yml has been changed to show-update-messages, and the default value is now true instead of false (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 the reload function within the script config, and configs are now automatically reloaded after calling save. 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

22 May 05:12
Compare
Choose a tag to compare

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 to ScriptManager#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

03 Apr 20:16
Compare
Choose a tag to compare

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.

v0.4.0

03 Sep 19:09
Compare
Choose a tag to compare

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:

  • Script command tab executor now returns an empty list instead of null, which fixes unexpected behavior with tab completion (a26ace9)
  • Fixed a bug where script loading would halt if a load was attempted on a script with a duplicate name (37d83aa)

v0.3.1

09 Jul 21:11
Compare
Choose a tag to compare

Additions in this version:

  • Added some API methods to TaskManager (79d3200)

Changes in this version:

  • TaskManager was partially rewritten (79d3200)

Bugs fixed in this version:

  • Fixed delayed (synchronous and asynchronous) tasks not being cancelled on script unload (79d3200)
  • Fixed error when unregistering listeners for events where getHandlerList is defined in a superclass (173285c)

v0.3.0

07 Jul 00:54
Compare
Choose a tag to compare

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:

  • The LibraryManager now appropriately closes the class loader on server shutdown/plugin unload. (1d5cfac, 2c5e01c)

v0.2.0

04 Jul 19:11
Compare
Choose a tag to compare

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.