Closed bessel28 closed 4 months ago
I've fixed this on my fork by using the load
function instead of init
inside the CommandRegistry
.
Seems that calling CommandFactory.getInstance().add()
inside the init
function calls SkriptUtils.loadCode(trigger, CommandEvent.class)
when creating the CommandObject
, causing the trigger the be loaded before any ScriptFunction
s have been registered
would be good to make a PR with this fix
I agree, it would greatly benefit Sky and everyone else who uses DiSky.
The following script:
Displays this error when reloading (with verbosity on debug):
Where it attempts to validate the function signature in the discord command BEFORE the function signature itself has been registered. If
testFunc()
is moved to a different script and that script is loaded before reloading the discord command it reloads with no errors.Server Version:
git-Paper-461 (MC: 1.20.4)
Skript Version:2.8.3 (skriptlang-github)
Disky Version:DiSky v4.13.0
(built from dev branch)