API Reference - trethore/MQS GitHub Wiki
This section serves as a central hub for the My QOL Scripts API documentation. Each page details a specific manager or utility library, explaining its purpose, methods, and providing practical examples.
Whether you're looking to create a simple command or a complex game modification, this is your guide to the tools available.
-
- An overview of the global objects, functions, and context in which your scripts run. Start here to understand the landscape.
-
- Learn how to listen and react to in-game events, from player actions to rendering ticks.
-
- Create custom keybinds to trigger actions in your scripts.
-
- Build powerful, client-side chat commands with arguments and tab-completion.
-
- Save and load persistent data for your scripts, such as user settings or saved locations.
-
HookManager API
(Advanced)
- Dive deep into the game's code by intercepting and modifying Java method calls directly. Use with caution!
-
- Understand how to use
importClass
,extendMapped
, andwrap
to work seamlessly with Minecraft's Java classes.
- Understand how to use
-
- Explore the collection of helper libraries for common tasks like 2D/3D rendering, chat messages, and color manipulation.
-
- A step-by-step tutorial for building a basic MQS script from scratch.
-
- A collection of complete, working scripts that demonstrate how to combine different APIs to achieve practical goals.
To help you on your scripting journey, here are some useful external resources:
- W3Schools JavaScript Tutorial: An excellent resource for learning the fundamentals of JavaScript.
- GraalJS Reference Manual: The official documentation for the JavaScript engine MQS uses. Useful for understanding advanced features and compatibility.
- Fabric Yarn Mappings Browser (1.21.4): An essential tool for finding the correct names of Minecraft classes, methods, and fields to use in your scripts.
-
ByteBuddy Documentation: For the curious, this is the library MQS uses under the hood to power the
HookManager
.