blog
Porting Chat Commands to Stardew Valley 1.6
When the public API loses a capability but the runtime doesn't, reflection is the honest middle ground.
What broke
Stardew Valley 1.6 moved modding infrastructure forward, and SMAPI removed ICommandHelper.Trigger in the process. Any mod that fired console commands programmatically lost its mechanism overnight.
Chat Commands let players run console commands from the in-game chat box, with scrollable history, console mirroring and whisper/reply support. The port had to preserve all of it on the new base.
The reflection route
SMAPI's CommandManager still exists internally; only the public helper surface changed. Reflecting into the private CommandManager restored command execution without patching SMAPI itself or shipping a forked build.
It is the kind of fix worth writing down because it generalizes: before rewriting a feature, check whether the capability moved rather than disappeared.
Related: Field note: Chat Commands port