Interacting with Java and Kotlin
How To Interact With Java and Kotlin classes in Lua ?
It's pretty simple, first you import and load the class with requireJVM
:
After importing our class we can access fields in it using .
and methods or functions with :
Additionally you should always use the isEnabled()
and onDisable()
lua built-ins, they allow you to properly manage cleanup when the user turns off your script, technically you can ignore it, but that results in your script not being able to be turned off by the user 🤷
Last updated