SkriptLang / AddonPatcher

Patch addons to make them compatible with new Skript versions
GNU General Public License v3.0
5 stars 1 forks source link

AddonPatcher

The addon patcher is a tool that patches your addons to be more compatible with new versions of Skript.

The following is a list of changes in Skript this tool fixes, along with the exceptions generated by incompatible addons:

Variants

The addon patcher has 3 variants: Replacer, Agent and Java:

Agent (Recommended)

The Agent variant is a plugin that, when installed on your server, automatically patches each addon class used.

This variant requires you to run the server with a JDK instead of JRE.

Replacer

The Replacer variant is a plugin that, when installed on your server, automatically patches all addons the moment you start the server. The Replacer variant will modify your addon.jar file for the addons that require patching.

This variant does not fully work on Paper 1.19+. It can be used on those Paper versions, but requires you to restart your server (twice) after initially installing AddonPatcher, and when installing new addons.

Java

The Java variant is not a plugin: it is a standalone Java program that you can run to modify your addon.jar files, with the command java -jar AddonPatcher.jar <addon.jar> in a terminal / command prompt window in the folder with both your addon and AddonPatcher .jar files. Alternatively, you can run java -jar AddonPatcher.jar <folder> in a folder with AddonPatcher.jar and the given folder, to patch all addons in the given folder.

Compiling

Two possible commands, depending on which variant you want (if you want Java, flip a coin):

The current build script isn't great, so the clean task beforehand is very much recommended. PRs improving the build script would be greatly appreciated.