OneConfig V1
  • Welcome
  • Documentation license
  • Introduction
    • Getting started
  • Configuration
    • Creating your config
      • Option dependencies & hiding options
      • Listening for option changes
    • Available options
      • Boolean options
        • Switch option
        • Checkbox option
      • Number options
        • Slider option
        • Number option
      • Selector options
        • Dropdown option
        • Radio button option
      • Text option
      • Color option
      • Keybind option
      • Buttons
      • Accordions
      • Decorations
    • Creating your own options
  • Commands
    • Annotation-based commands
    • Tree-based commands
  • Events
    • Using the events system
      • Callback events
      • Subscriber events
  • Utilities Module
    • Hypixel utilities
    • IO utilities
    • Networking utilities
    • JSON utilities
    • Multithreading
    • Platform-specific utilities
  • Migration
    • Temporary V0 -> V1 migration guide
    • Migrating your configs from Vigilance
Powered by GitBook
On this page
Export as PDF
  1. Events

Using the events system

PreviousTree-based commandsNextCallback events

Last updated 6 months ago

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 , you are likely more familiar with callback-based events. If you have worked with or , you are likely more familiar with subscriber-based events.

It is preferred to use callback-based events for code quality, maintainability and speed.

Fabric API
MinecraftForge
NeoForge
Callback events
Subscriber events