Test Event Listener
Diagnostic event listener for testing and debugging the CorePlugin event system.
This listener class is specifically designed for development and debugging purposes to verify that the plugin's custom event system is functioning correctly. It listens for PlayerFlagSetEvent occurrences and provides detailed logging and feedback when specific test flags are modified.
Primary Purpose:
Validates that custom events are firing correctly
Provides detailed debugging information for event flow
Enables testing of the plugin's event system through
/core testplugincommandAssists in troubleshooting event-related issues during development
Scope and Filtering: The listener is specifically designed to respond only to test-related flag changes (flagName == "coreplugin_test_flag") to avoid spam from normal gameplay events. This filtering ensures that diagnostic output is only generated during explicit testing.
Output Channels:
Console logging for server administrators and developers
In-game messages for operators who triggered the test
Structured messages using Adventure API for rich text formatting
Integration: This listener is automatically registered during plugin initialization and works in conjunction with the /core testplugin command to provide comprehensive event system validation.
Parameters
Reference to the main CorePlugin instance for logging and system access