Skip to content

Commit

Permalink
fix: 注入式插件无法重载 player_message 事件的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperScript-PRC committed Feb 4, 2025
1 parent 3c6281f commit 2fc6726
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tooldelta/plugin_load/PluginGroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def reload(self):
self.execute_reloaded(self.linked_frame.on_plugin_err)
Print.print_inf("开始执行插件游戏初始化方法")
self.execute_init()
Print.print_suc("重载插件完成!")
Print.print_suc("重载插件已完成")

@staticmethod
def add_plugin(plugin: type[_PLUGIN_CLS_TYPE]) -> type[_PLUGIN_CLS_TYPE]:
Expand Down
3 changes: 2 additions & 1 deletion tooldelta/plugin_load/injected_plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
loaded_plugin_modules = []



def reload():
"""系统调用, 重置所有处理函数"""
player_death_funcs.clear()
player_message_funcs.clear()
player_prejoin_funcs.clear()
player_join_funcs.clear()
player_left_funcs.clear()
Expand Down

0 comments on commit 2fc6726

Please sign in to comment.