【MCDR Tutorials 01】Introduction
The vanilla Minecraft technology survival has become a hot topic in recent years. Perhaps because of the pandemic, people have been able to pick up the game they put down years ago, or perhaps because of the successful advertising of TIS, students have been able to look up from the tasteless mobile games, and this long-history but minority topic has gradually entered the public eye. In the last three years, a large number of new technology survival servers have been founded, and both old and new players have been blown away by the unlimited potential shown by this decade-old game. And behind these servers, almost all are using a significant server management tool - MCDReforged.
In November 2018, before the TIS started the server, chino_desu developed the server management tool MCDaemon. Without modifying the vanilla server, the tool provides server management functions such as restart, world files backup, automatic rollback, cross-service chat, mirror synchronization, etc.
With the development of TIS, powerful functions shown by the MCDaemon are notified by many people, especially the saves backup and rollback. They want to use MCDaemon to manage their server, but it does not support Windows. Therefore, lightbrotherV created the project MCDaemon-go, which is compatible with the Windows system.
Although MCDaemon-go is compatible with windows, it cannot load Python plugins from MCDaemon. Repeating the development of two system plugins is obviously not wise and unsustainable for long-term community development. During the period, some users created forks like MCD-Windows, and now most are deleted.
TIS has used MCDaemon for a while, and many problems have been revealed, and there are a lot of features to optimize, so the development of MCD 2.0 is on the agenda.
In March 2020, Fallen_Breath started the development of MCDReforged, which can run on Windows.
Chino sent the source code of MCD 2.0 and the expected features list to Fallen_Breath. In March 2020, MCDR released its first prerelease. In May, chino announced to stop the development and maintenance of MCDaemon.
At the beginning of MCDR development, I gave Fallen a small portion of the MCD 2.0 source code I had written, as well as a list of expected MCD 2.0 features. It’s hard to say if it helped Fox write MCDR, but the directory structure in the src of MCDR does look like MCD 2.0.
MCDReforged is a tool that provides the management ability of the Minecraft server using a custom plugin system. It doesn’t need to modify or mod the original Minecraft server at all. From in-game calculator, player high-light, to manipulate scoreboard, manage structure file and backup / load backup, you can implement these by using MCDR and related plugins.
—— The readme of MCDReforged
The MCDReforged completely liberates the limitations of MC server management. The relatively independent server management tool can manipulate server files during the server is turned off or provides functions without permitting OP permission to players.
This really fits the needs of the vanilla technical survival players and has effectively contributed to the excellent development of MC vanilla technical survival in recent years. It is also behind the resurgence of Minecraft topics in China during the epidemic.
Today, many bukkit and mod servers use MCDR to save file management and cross-server chatting functions.
How it works
Actually, the principle of MCDR is straightforward.
MCDR uses Popen to start the server as a sub-process, then it has the ability to control the standard input / out stream of the server. Since the console output of a Minecraft server has a stable format and contains a large amount of useful information about the server, e.g. player chat messages, MCDR is able to parse and analyze the server output, abstract them into different events, and dispatch them towards plugins for responding. With the help of the Minecraft command system, MCDR can send Minecraft commands via the standard input stream to affect the actual Minecraft server. 
Plugins react differently depending on different events. For example, players can back up server saves, send their location to other players, use the calculator, manage and store fake players, etc., by typing specific commands in the chat box.
- The ability to control the running status of the server. No plugin or mod can manage a turned-off server, but MCDReforged can do that easily because it runs out of the server. Any Bukkit plugin or Forge/Fabric mod can never achieve the feature.
- The ability to manage server files. The ability to freely control the running of the server allows MCDR to manage files that must restart the server. For example, shutting down the server and rollback the save, changing server mods or plugins, can be easily implemented by MCDR plugins, eliminating manual login to the server terminal.
- Management ability out of the server. Independent running decoupling MCDR and the server, which helps to implement unbelievable functions in the past.
- Cheap to get started and easy to develop. Complete documents allow server owners only need basic computer skills to get started. MCDR and its plugins are written in Python, an easy language that makes it easy to quickly learn and develop plugins over the Internet.
- Fantastic community energy and support services. Many excellent plugins are still emerging from the community, and new users become plugin developers, updating old plugins to add new energy and ideas to the community. A large number of users and active MCDR developers work together to provide multi-platform, responsive, and satisfying technical support, application deployment, and emergency maintenance services.
- TIS_TrinityUnion. "一起见证原版生存科技的巅峰！TIS服务器一周年纪念视频 TIS Trinity Union First Anniversary". bilibili. 29 November 2019. Archived from the original on 23 August 2022. Retrieved 23 August 2022. ↩
- kafuuchino-desu. "MCDaemon". GitHub. Archived from the original on 23 August 2022. Retrieved 23 August 2022. ↩
- kafuuchino-desu. "Initial commit". GitHub. 13 November 2018. Archived from the original on 23 August 2022. Retrieved 23 August 2022. ↩
- TISUnion. "MCDaemon-go". GitHub. Archived from the original on 23 August 2022. Retrieved 23 August 2022. ↩
- lightbrotherV. "Initial commit". GitHub. 2 December 2018 Archived from the original on 23 August 2022. Retrieved 23 August 2022. ↩
- Fallen-Breath. "MCDReforged". GitHub. Archived from the original on 15 May 2022. Retrieved 23 August 2022. ↩
- Fallen-Breath. "init". GitHub. 30 May 2020 Archived from the original on 23 August 2022. Retrieved 23 August 2022. ↩