diff --git a/README.md b/README.md index bc575eb..4112b03 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ If you need English support, please open an issue and let me know about that, ma |键名|默认值|数据类型|含义| |----|----|----|----| |`config_version`|`3`|整型|配置文件版本,请勿修改| -|`command_prefix`|`'!!tp'`|字符串|指令前缀| +|`command_prefix`|`!!tp`|字符串|指令前缀| |`level_location`|`server/world`|字符串|level.dat 所在目录,用于检测出生点| |`teleport_hold_time`|`0`|整型|传送执行前等待的时间(单位:秒)| |`teleport_request_timeout`|`30`|整型|传送请求超时的时间,设为 0 永不超时(单位:秒)| diff --git a/Telekinesis.py b/Telekinesis.py index 3770986..33f63ec 100644 --- a/Telekinesis.py +++ b/Telekinesis.py @@ -64,7 +64,7 @@ class InvalidCommandError(Exception): def generateDefaultConfig(): # 生成默认配置文件 with open(f"config/{PLUGIN_METADATA['name']}/config.yaml",'w',encoding='utf8') as f: - write(default_config.lstrip()) + f.write(default_config.lstrip()) def upgradeConfig(server,from_config_version): # 更新配置文件 with open(f"config/{PLUGIN_METADATA['name']}/config.yaml",'a+',encoding='utf8') as f: