Description
This mod enables server admins to observe what mods clients joined the server with. Insight is granted via the added /modlist command, as well as an optional (enabled by default) message containing the current mod list that gets logged when a player joins the server.
Command usage:
/modlist <target> current gives you the mod list the target(s) last joined the server with
/modlist <target> all gives you the list of all mods the target(s) joined the server with since the last server restart
This is a Forge/NeoForge mod, a Fabric port may happen in the future (if there is demand).
This mod is serverside only undefined(meaning that this mod only needs to be installed on the server to work).
About 1.20.4+: In all Minecraft versions above 1.20.1, I develop my mods for NeoForge (instead of Forge) since NeoForge is basically the continuation of the old Forge, with all of the former Forge's team members. However, 1.20.4 has seen a network refactor in NeoForge, and during that rewrite the idea of the client sending its mod list to the server automatically was met by backlash due to people caring about privacy regarding what mods they have installed on their client, so that feature has (from my understanding) been put on hold. This means that the original concept of ModListObserver as a server-only mod cannot ever work in NeoForge 1.20.4+ as of now. If you think that this is a bummer (so do I), feel free to pop by the NeoForge discord and express your desire to have the client automatically sending its mod list to the server implemented again (of course, in the right channel of the server and in a polite manner).
As a final note:
The mod list observable by ModListObserver is not authorative. A mod missing from the list does not necessarily mean the mod isn't there, and similarly a mod present in the list does not necessarily mean it is there. People using hacked clients may and will hack their mod list to make it look unsuspicious. Because of this, this mod will never add a feature to automatically blacklist players with certain mod lists, its sole purpose is to help admins with their decision of whether a player is using a disallowed mod.