Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 1.39 KB

File metadata and controls

25 lines (21 loc) · 1.39 KB

AskTheVault - TODO

1. Set Up the Fabric Mod Project

  • Install JDK 21 and IntelliJ IDEA
  • Clone the fabric-example-mod template from GitHub as your starting point
  • Configure gradle.properties with your mod name, id (askthevault), version and Minecraft/Fabric versions
  • Do a test build and make sure a blank mod loads in Prism without crashing

2. Build the Chat Command System

  • Register a custom command using Fabric's command API (e.g. /query <sql>)
  • Learn how Fabric events work by listening for the command being fired
  • Write a response back to the player's chat using the server's sendMessage API
  • Test with a hardcoded response first ("it works!") before touching the database

3. Connect the SQLite Database

  • Add the SQLite JDBC driver as a dependency in your build.gradle
  • Write a DatabaseManager class that opens a connection to your .db file
  • Execute the SQL query from the chat command against the database
  • Format the results into readable chat messages and send them back to the player

4. Polish and Error Handling

  • Handle bad SQL queries gracefully (wrong syntax, no results, etc.)
  • Make the database path configurable so it works on other machines too
  • Add a permission check so only you can run queries (important if you ever play multiplayer)
  • Write a basic README explaining how to set it up and use it