I am working on a text-based RPG called The Java Secret. It will not just be for fun, it will also help players learn how to program in Java. There's instructional code snippets in this collection.
A lot of this code might seem confusing if you're a new Java developer, but I'll be explaining it all in due time. If you'd like to start learning, I'm writing lessons and tutorials on Java game development here: https://itch.io/jam/summer-learn-java-jam-month-1/community
To learn more about the game, visit http://bit.ly/2K3mYoZ.