Chat Command System
I wrote this TurboHUD plugin to commandeer the in-game chat prompt, adding another way to accept player input and make plugins respond to requests. ChatCommand streamlines the implementation of custom chat commands, handling the quirks involved in polling for changes in UI text, parsing chat text and sending out neatly packaged notifications to IChatCommandHandler plugins that are listening for specific invocation strings. ChatCommand matches any kind of text at the beginning of the input string. It doesn't have to be a forward slash command, but I prefer forward slash commands because they don't show up to other players in chat when you submit them (press Enter). It also notifies interested plugins whenever there is a change in the command parameters, which allows a plugin to respond on-the-fly if desired, not just upon submit. Here is an example of a quick developer tool I put together with it that responds to a /texture chat command and displays the provided textu...