Closed loud2pro closed 1 month ago
Sorry, I forgot to add the getMode()
API for ModeSetting.
In the next version you will be able to get the values of SliderSetting and ModeSetting via modules.getMode()
or modules.getSilder()
.
By the way, in the current version, you can do this via reflection:
void onEnable() {
try {
Class<?> rotationHandlerClass = Class.forName("keystrokesmod.module.impl.other.RotationHandler");
java.lang.reflect.Field moveFixField = rotationHandlerClass.getDeclaredField("moveFix");
Class<?> moduleManagerClass = Class.forName("keystrokesmod.module.ModuleManager");
java.lang.reflect.Field rotationHandlerField = moduleManagerClass.getDeclaredField("rotationHandler");
Object rotationHandler = rotationHandlerField.get(null);
moveFixField.setAccessible(true);
double input = ((keystrokesmod.module.setting.impl.ModeSetting) moveFixField.get(rotationHandler)).getInput();
client.print(String.valueOf(input));
} catch (Exception e) {
client.print(e.getMessage());
}
}
Okay, I will try that. Thanks!
Pre-reporting checklist
Description
Hello, when I try to use your Scripting API to get a Mode Setting's current value (there is no way to get a mode setting in itself, and reading https://blowsy.gitbook.io/raven/documentation/modules tells me to use modules.getSlider), it throws a ClassCastException
Here is the code I've wrote for it:
Repro steps
Raven XD version
v1.14
Crash report (if applicable)
No response