I’ve decided to implement my own OpenTTD admin library to be able to connect to the server’s admin port and offer some additional functions to the users and to myself.
There are already a few libraries available, as described on the OpenTTD Wiki. But I have to admit, with simply no description of the Python one it took me too long to identify the correct way of using it. The Java one surprised me with the code not being developed since 2014 anymore. Now I know, there was no need to develop it further, since the protocol is pretty old. Whatever…
The idea is to hide the original OTTD protocol from the client app and offer native Java interfaces for interacting with the server. This approach required quite a lot of classes to be written and quite a lot of research in the game’s original code to understand the mechanics behind the protocol.
The library is published on GitHub under MIT license with an exception of one file under GNU GPL v3 license.