Skip to content

Commit

Permalink
added ingame warning when cache failed (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan-1F committed Jun 30, 2024
1 parent 8af89c4 commit 1c3d46d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lang/en_us.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ mcdreforged_plugin_manager:
cache: Updating plugin index cache
cached: Plugin index updated; {0} new plugins
exception: 'Failed to update plugin index: {0}'
exception_ingame: '§cFailed to update plugin index, see console for more details'
clock:
started: 'Plugin index update clock started, interval: {0} seconds'
plugin:
Expand Down
1 change: 1 addition & 0 deletions lang/zh_cn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ mcdreforged_plugin_manager:
cache: 正在更新插件库索引
cached: 插件库索引更新完成; 新增 {0} 个插件
exception: '插件库索引更新失败: {0}'
exception_ingame: '§c插件库索引更新失败,查看控制台以获取更多信息'
clock:
started: 插件库索引定时更新计时器启动,间隔 {0} 秒
plugin:
Expand Down
1 change: 1 addition & 0 deletions mcdreforged_plugin_manager/storage/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def cache(self):
try:
download_file(config.source, self.TMP_CACHE_PATH)
except Exception as e:
psi.say(tr('cache.exception_ingame'))
psi.logger.warning(tr('cache.exception', e))
else:
# remove cache if exist
Expand Down

0 comments on commit 1c3d46d

Please sign in to comment.