Tuke-Nuke / TuSKe

TuSKe is a Skript addons which brings some new cool things and some simple plugins hook.
18 stars 36 forks source link

Conflict with Tuske 1.8.2 and Skript 2.2 (Njol's version) #35

Closed Anarchick closed 2 years ago

Anarchick commented 6 years ago

The problem concern Tuske v1.8.2 (and all dev 0 to 7) Does not apear with Skript Bensku 31c (and maybe other version) The problem apear with Skript Njol 2.2 from https://skripttools.net AND my own "Skript Njol 2.2-fixes-v9b" The problem DOES NOT apear in Tuske 1.8.1 with skript Njol *The problem apear in Spigot 1.9.2 and 1.10.2 (maybe in all versions of Spigot, i had just tested this 2 versions)

What i had test: I have create a clean server's folder with Spigot 1.9.2 (and 1.10.2) with ONLY Tuske.jar and Skript.jar Run server with JAVA 8 I had test all possibilities off Tuske 1.8.1 / 1.8.2 and Skript 2.2 Njol / Skript Bensku 31c Test with skript: on sprint toggle: broadcast "open" open virtual chest inventory with size 4 named "<green><bold>Console personelle" to player format gui slot 1 of player with stone named "<pink>test" to do nothing

The problem: Tuske 1.8.2 is 200% incompatible with Skript Njol 2.2 = Skript crash if this line is loaded : format gui slot 1 of player with stone named "test" to do nothing BUT This line work : open virtual chest inventory with size 4 named "Test" to player

The problem is only caused by "(format|create|make) [a] gui slot" If this code is in a file.sk, this line apear on chat: "an internal error occured while attempting to perform this command" latest.log

The console said a WARN on Skript Task #3 if the line " format gui slot" is set when the server start

Wqrld commented 6 years ago

confirmed with 2.2-Fixes-v8B

Snow-Pyon commented 6 years ago

I see what's the problem here, in dev21, the method SkriptEventHandler#addSelfRegisteringTrigger was made public, but before that, it was package-private. That's the reason why this fails in lower versions, accessing the method via reflection would be the solution here.