Introduction¶
Events in actmc let your bot react to things happening in Minecraft. Think of them as notifications that tell your code "Hey, something just happened!".
How It Works¶
Simple concept:
- You write a function
- The client watches for activities
- When something happens, your function runs automatically
Two Ways to Handle Events¶
You can register events using two approaches:
Using the @client.event decorator¶
Direct method definition (no decorator needed)¶
Why Use Events?¶
Events make your bot responsive and efficient:
- No need to constantly check for changes
- Code only runs when something actually happens
- Clean organization for different reactions