diff options
| author | Sho Sakuma <me@m1sk9.dev> | 2026-02-10 15:54:49 +0900 |
|---|---|---|
| committer | Sho Sakuma <me@m1sk9.dev> | 2026-02-10 15:54:49 +0900 |
| commit | 1936ca3dce9cb29b767ba8d5389b6881f90b3e02 (patch) | |
| tree | b3a9be9de4e576e5348d8c86bd68fc1ef9754f0c | |
| parent | f63c3af06962075da0bd4595b74eeac41a85d10c (diff) | |
| download | LunaticChat-1936ca3dce9cb29b767ba8d5389b6881f90b3e02.tar.gz LunaticChat-1936ca3dce9cb29b767ba8d5389b6881f90b3e02.tar.bz2 LunaticChat-1936ca3dce9cb29b767ba8d5389b6881f90b3e02.zip | |
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 <noreply@anthropic.com>
| -rw-r--r-- | platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/messaging/PluginMessageHandler.kt | 6 |
1 files changed, 6 insertions, 0 deletions
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, |
