Normally, in almost all cases, you write your Minecraft mod, build it, put the .jar in your mods folder, run Minecraft with Forge, and the mod just works as intended.
But I was wondering: what if you made a mod that works more like a Roblox executor? Basically, the mod itself would act as an "executor," providing some kind of in-game console or text box where you could write scripts (in Java, or Kotlin if enabled), run them at runtime, and then re-run modified versions without ever having to close and restart Minecraft.