https://github.com/skriptlang/addonpatcher
Patch addons to make them compatible with new Skript versions
https://github.com/skriptlang/addonpatcher
Last synced: over 1 year ago
JSON representation
Patch addons to make them compatible with new Skript versions
- Host: GitHub
- URL: https://github.com/skriptlang/addonpatcher
- Owner: SkriptLang
- License: gpl-3.0
- Created: 2022-11-06T15:11:50.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-06T01:48:24.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T05:42:53.233Z (over 1 year ago)
- Language: Java
- Size: 117 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
- Parallel Script Loading [#3924](https://github.com/SkriptLang/Skript/pull/3924):
- `java.lang.NoSuchFieldError: currentScript`
- `java.lang.NoSuchFieldError: currentSections`
- `java.lang.NoSuchFieldError: currentLoops`
- `java.lang.NoSuchFieldError: hasDelayBefore`
- Structure API [#4108](https://github.com/SkriptLang/Skript/pull/4108)
- `java.lang.NoSuchMethodError: 'ch.njol.skript.config.Config ch.njol.skript.lang.parser.ParserInstance.getCurrentScript()'`
- `java.lang.NoSuchMethodError: 'java.io.File ch.njol.skript.lang.Trigger.getScript()'`
- `java.lang.NoSuchMethodError: 'void ch.njol.skript.lang.Trigger.(java.io.File, java.lang.String, ch.njol.skript.lang.SkriptEvent, java.util.List)'`
## 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](https://github.com/SkriptLang/AddonPatcher/issues/2) 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 `
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 ` 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):
- `gradlew clean agentJar`
- `gradlew clean replacerJar`
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.