Skip to content

Commit

Permalink
add default config file in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
OptiJava committed Feb 26, 2023
1 parent f9bbfd6 commit 7f595e9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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((
2 changes: 1 addition & 1 deletion mcdreforged.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "Seed",
"description": "Get world seed without op permission.",
"author": [
"OptiJava"
"OptiJava"
],
"link": "https://github.com/OptiJava/Seed",
"dependencies": {
Expand Down
6 changes: 3 additions & 3 deletions seed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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))
)

0 comments on commit 7f595e9

Please sign in to comment.