<@U0CHHN4F4> Hi, when a should use `ScriptEvaluati...
# scripting
s
@ilya.chernikov Hi, when a should use
ScriptEvaluationConfigurationKeys.constructorArgs
? My code loads the script and return to me a KClass, no a new object from the compiled script
Copy code
val evalConfig = ScriptEvaluationConfiguration {
        constructorArgs(plugin)
        set(JvmScriptEvaluationConfiguration.actualClassLoader, bukkriptClassLoader)
    }

    val clazz = bukkriptCompiledScript.compiledScript.getClass(evalConfig).resultOrSeveral(plugin)
In this case a should not use
constructorArgs()
?
i
If you construct your class yourself, you don’t need it. If you’re using evaluator that constructs the class for you, then you should supply it with constructor args (if there are any) via evaluation configuration.
s
Okay, tkx 😊