From 1936ca3dce9cb29b767ba8d5389b6881f90b3e02 Mon Sep 17 00:00:00 2001 From: Sho Sakuma Date: Tue, 10 Feb 2026 15:54:49 +0900 Subject: docs: Add clarifying comment for plugin parameter type Explain why the plugin parameter uses Any type instead of a generic: - Velocity's EventManager.register() accepts Object - Generic type provides little practical benefit given the API design - Typically receives the main plugin instance Co-Authored-By: Claude Sonnet 4.5 --- .../m1sk9/lunaticChat/velocity/messaging/PluginMessageHandler.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/messaging/PluginMessageHandler.kt b/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/messaging/PluginMessageHandler.kt index fb69fa4..74da9f2 100644 --- a/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/messaging/PluginMessageHandler.kt +++ b/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/messaging/PluginMessageHandler.kt @@ -14,6 +14,12 @@ import org.slf4j.Logger * Handles plugin messages from Paper servers */ class PluginMessageHandler( + /** + * Plugin instance used for event registration. + * Type is [Any] because Velocity's EventManager.register() accepts Object. + * Could be made generic, but provides little practical benefit since the API itself is not type-safe. + * Typically the main plugin instance is passed here. + */ private val plugin: Any, private val server: ProxyServer, private val logger: Logger, -- cgit v1.2.1