TADS is pretty similar to Java in that you can create and delete objects and generally modify it in wild ways it doesn’t expect any particular type of game (other than presumably a parser), though its most popular libraries (Adv3 and adv3Lite) do.
(here’s a good overview!)