Using the events system
Last updated
Last updated
OneConfig has it's own custom event system, which can either be callback- or subscriber-based depending on your preferences. It provides several default events relating to basic OneConfig functionality and Minecraft-relating functionality.
If you have used the Fabric API, you are likely more familiar with callback-based events. If you have worked with MinecraftForge or NeoForge, you are likely more familiar with subscriber-based events.
It is preferred to use callback-based events for code quality, maintainability and speed.