Open Maple-YZ opened 2 months ago
not unheard of I'd probably wait for a member of the org to respond as it was responded with in under 10 seconds of making this issue
Temporarily fixed this issue
By adding a piece of codes:
+import:
+ ch.njol.skript.classes.Changer
+ ch.njol.skript.lang.util.ConvertedExpression
effect bind %item% to %offline player%:
trigger:
set {_i} to expr-1
set string tag "bind" of custom nbt of {_i} to name of expr-2 # from SkBee addon
+ if (the raw expr-1) is an instance of ConvertedExpression:
+ (the raw expr-1).acceptChange(Changer.ChangeMode.SET)
set the raw expr-1 to {_i}
command /bindtest <offline player>:
permission: jing.op
trigger:
bind tool of player to arg-1
The thing is, a converted expression won't use acceptChange
method on custom effect section, which won't initialize the returnTypeInfo
field, thus the expression can't be changed by using change
method.
I know very little of how the script system works, so I don't know how to fix this in a better way and only made this simple fix.
Needs someone knowing the system well to eventually fix this.
Describe the bug when change value of a
ConvertedExpression
instance on custom effect, the trigger stops and generates an error like this:To reproduce use the script below to reproduce:
Expected behavior Modify the
ConvertedExpression
normally, like in the origin skript effects.Screenshots
Server information
Additional context If we change a variable instead of a converted expression, the custom effect works well: