In Minecraft 26.2, Hardcore mode locks cheats and difficulty changes by default – there's no normal way to change them, and you'd have to mess around with an NBT editor. This mod solves that pain point: just type a few commands in-game, no need to exit your world or touch any save files.
Main Features:
Toggle cheats on/off (even if the world wasn't created with cheats enabled)
/cheattoggle cheats <true/false>
Enable/disable difficulty lock (not usable in Hardcore mode)
/cheattoggle lockdifficulty <true/false>
Change difficulty to any setting (Peaceful/Easy/Normal/Hard, works in Hardcore mode)
/cheattoggle difficulty <peaceful/easy/normal/hard>
Show/hide the operator items tab in the Creative inventory
/cheattoggle operatoritems <true/false>