diff --git a/README.md b/README.md index 5371fc7..7931b88 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,18 @@ - `command`: Command to get seed in console - `parser`: Parser for the command result +Default config file: +``` +{ + 'command': 'seed', + 'parser': 'Seed: [{}]' +} +``` + The default configuration already supports most server software (without plugin/mods). -## More +## Thanks to + +This plugin was inspired by [`MCDReforged/Seed`](https://github.com/MCDReforged/Seed) -This plugn was inspired by [`MCDReforged/Seed`](https://github.com/MCDReforged/Seed) +Thanks to @[alex3236](https://github.com/alex3236) for refactoring the code(( diff --git a/mcdreforged.plugin.json b/mcdreforged.plugin.json index 35258a9..50b08ea 100644 --- a/mcdreforged.plugin.json +++ b/mcdreforged.plugin.json @@ -4,7 +4,7 @@ "name": "Seed", "description": "Get world seed without op permission.", "author": [ - "OptiJava" + "OptiJava" ], "link": "https://github.com/OptiJava/Seed", "dependencies": { diff --git a/seed/__init__.py b/seed/__init__.py index 8f6ec4b..11eb97e 100644 --- a/seed/__init__.py +++ b/seed/__init__.py @@ -46,7 +46,7 @@ def get_seed(server: PluginServerInterface): getting_seed = False -def on_info(server: ServerInterface, info: Info): +def on_info(server: PluginServerInterface, info: Info): global getting_seed, seed if getting_seed: result = parse(config['parser'], info.content) @@ -61,7 +61,7 @@ def print_seed(source: CommandSource): RTextMCDRTranslation('seed.get_seed', RColor.yellow), RText('[', RColor.white), RText(seed, RColor.green, RStyle.underlined). - h(RTextMCDRTranslation('seed.copy_to_clipboard')). - c(RAction.copy_to_clipboard, seed), + h(RTextMCDRTranslation('seed.copy_to_clipboard')). + c(RAction.copy_to_clipboard, seed), RText(']', RColor.white)) )