plugin installer, docker image, lots of new APIs, and more...
ServerInterface APIs
- Added new API `register_server_handler`
- Added new API `register_info_filter`
- Added new API `get_plugin_type`
- Added new API `is_plugin_file_changed`
- Added new API `manipulate_plugins`
- Added kwarg `data_processor` for `load_config_simple` for easier config data migration
- Added kwarg `allow_duplicates` for `register_command` with default `false` for easier debugging on accidental command duplciation
- Fixed `load_config_simple` fixed cannot deserialize object from yaml
Command APIs
- Added kwarg `accumulate` to `ArgumentNode` constructor. With it set to `true`, reentering the nodes accumulates parsed values into a list
- Renamed `command_builder_util` to `command_builder_utils`. The old name is still accessible from the `api` package
Plugin Installer for MCDR
Added commands to access and install plugins from [the plugin catalogue](https://mcdreforged.com/en/plugins)
- `!!MCDR plugin browse`: Browse plugins in the catalogue
- `!!MCDR plugin install`: Install / Upgrade given plugins
- `!!MCDR plugin checkupdate`: Check for plugin updates
- `!!MCDR plugin refreshmeta`: Refresh plugin catalogue meta cache
See more at https://docs.mcdreforged.com/en/latest/command/mcdr.html#plugin-catalogue-access
<img alt="plugin install" src="https://github.com/MCDReforged/MCDReforged/assets/28978806/0a7d387b-3116-438c-848d-7e2829c2ae87" width="400"/>
Config
- Relocated config option orders in the default config file
- Updated the default `start_command` value to a side-effect free one
- `decoding` option can now accept a list of decoding method candidates for easier handling of mixed output encoding
- Added serval new options for the plugin installer
- `catalogue_meta_cache_ttl`, `catalogue_meta_fetch_timeout`, `catalogue_meta_url`, `plugin_download_url`, `plugin_download_timeout`, `plugin_pip_install_extra_args`
- Added options `http_proxy` and `https_proxy` for all http requrests in MCDR
CLI
- Added `--config` and `--permission` to CLI `init`, `start`, `gendefault` subcommands, for suppling path to the config and permission file
- Added `--auto-init`, `--no-server-start` options for CLI `start` subcommand
- Added subcommand `pim` for simply browse plugins, download plugins, or install python packages requirements
- Added subcommand `reformat-config`
- Renamed subcommand `gendefault` to `gen-default`. The old name is now an alias
See more at https://docs.mcdreforged.com/en/latest/cli/index.html
Docker
Added official docker image support, with base image and openjdk variants
- `mcdreforged/mcdreforged`: The basic image with MCDR
- `mcdreforged/mcdreforged-extra`: MCDR with lots of handful python package installed
- `mcdreforged/mcdreforged-$openjdk`: MCDR with openjdk (temurin, corretoo, zulu) installed
See more at https://docs.mcdreforged.com/en/latest/docker.html
Misc
- New flat-style logo (294)
- Added a "mcdreforged." prefix for all mcdreforged's internal translation
- Added `Metadata.to_dict` api
- Extracted an interface-only class `ServerHandler` from `AbstractServerHandler`
- Use regex instead of the `parse` lib for sever output parsing for all builtin server handlers, for more control on what will happen (287)
- Updated urls of MCDR repos / docs etc.
- Logger improvements:
- Show more detailed information in logging file
- Plugin can not set the log level of its logger to debug, to enable debug logging for its logger
- A lot of internal codes refactoring
Fixes
- Fixed unusual file mtime breaks plugin loading (293)
- Fixed handler displayed order not preserved in handler detector
- Fixed missing `__str__` on `CountingLiteral`