There is no documentation for ModAPI except for the stuff fellow modders have gathered and posted around. The official ModAPI is very barebones, there isn't a huge list of premade methods and capability built-in. It only provides a few ModEvents and a way to initialize custom code. The rest is left up to the modder to implement. There are several primary methods we use to add our custom functionality using the ModAPI, all through the provided InitMod entrypoint:
1. Register a handler for one of the build-in ModEvents.
2. Patch/hook a game method via the Harmony library.
3. Run custom code directly and/or add a new Unity GameObject to capitalize on its events.
Using a tool like dnSpy, we can decompile and read the game's code to determine how it works, and based on that, we can figure out how we need to adjust it in order to add our desired functionality.
For your questions:
As commented previously, there is the "say" command built-in the game. We can take a look at how the game executes this command natively and use the same methodology to do it ourselves in a ModAPI mod. Open the Assembly-CSharp.dll using dnSpy and find the class that handles the "say" console command. It may take some digging to find it. In this case, I found it under the ConsoleCmdServerMessage class. Reading the code, the key line that stands out is:
GameManager.Instance.ChatMessageServer(null, EChatType.Global, -1, msg, "Server", false, null);
Taking a closer look at this method reveals the parameters:
ChatMessageServer(ClientInfo _cInfo, EChatType _chatType, int _senderEntityId, string _msg, string _mainName, bool _localizeMain, List<int> _recipientEntityIds)
The game already tracks clients/players. Depending on how you want player information you want, there are different ways to fetch it. Just browsing through the code a little gives me a few options, there are probably more.
GameManager.Instance.World.GetPlayers()
SingletonMonoBehaviour<ConnectionManager>.Instance.Clients
ServerTools mod already does a bunch of work with chat messages and fetching player information. I would recommend browsing its source https://github.com/dmustanger/7dtd-ServerTools/ and don't try reinventing the wheel.
Absolutely, but it might not be as simple as you might hope. I would look into the XUiC_RecipeStack and XUiC_CraftingQueue classes. You might be able to do it by hooking (prefixing) the XUiC_RecipeStack.SetRecipe method and clamping the craftTime argument, but that's just a guess.