Getting Started
Services are accessed through dependency injection in your plugin constructor:Core Services
Game State
- IClientState - Access game client state, territory info, and login events
- ICondition - Check player conditions like combat, mounted, etc.
- IObjectTable - Access spawned game objects and entities
- ITargetManager - Get and set player targets
- IPartyList - Access party and alliance members
- IDutyState - Track duty state and events
User Interface
- IChatGui - Interact with the chat window
- IGameGui - Access game UI elements and coordinates
- IToastGui - Display toast notifications
- INotificationManager - Manage ImGui notifications
Commands & Input
- ICommandManager - Register slash commands
- IKeyState - Access keyboard state
Data & Resources
- IDataManager - Access game data sheets and files
- ITextureProvider - Load and create textures
Framework & Hooking
- IFramework - Framework update events and task scheduling
- IGameInteropProvider - Create hooks for game functions
- ISigScanner - Scan memory for signatures
Logging
- IPluginLog - Plugin logging service
Service Lifetime
All services follow the plugin lifetime:- Services are available after plugin construction
- Services remain valid until plugin disposal
- Always unsubscribe from events in your
Dispose()method
Best Practices
- Dependency Injection - Request only the services you need in your constructor
- Event Cleanup - Always unsubscribe from service events in
Dispose() - Thread Safety - Most services must be used from the framework thread
- Error Handling - Wrap service calls in try-catch blocks for stability