MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / load_plugin

Method load_plugin

source/binding/Python/maa/tasker.py:775–793  ·  view source on GitHub ↗

加载插件 / Load plugin 可以使用完整路径或仅使用名称, 仅使用名称时会在系统目录和当前目录中搜索. 也可以递归搜索目录中的插件 Can use full path or name only. When using name only, will search in system directory and current directory. Can also recursively search for plugins in a directory Args: path: 插件库路径或名

(path: Union[Path, str])

Source from the content-addressed store, hash-verified

773
774 @staticmethod
775 def load_plugin(path: Union[Path, str]) -> bool:
776 """加载插件 / Load plugin
777
778 可以使用完整路径或仅使用名称, 仅使用名称时会在系统目录和当前目录中搜索. 也可以递归搜索目录中的插件
779 Can use full path or name only. When using name only, will search in system directory and
780 current directory. Can also recursively search for plugins in a directory
781
782 Args:
783 path: 插件库路径或名称 / Plugin library path or name
784
785 Returns:
786 bool: 是否成功 / Whether successful
787 """
788 strpath = str(path)
789 return bool(
790 Library.framework().MaaGlobalLoadPlugin(
791 strpath.encode(),
792 )
793 )
794
795 _api_properties_initialized: bool = False
796

Callers

nothing calls this directly

Calls 1

frameworkMethod · 0.80

Tested by

no test coverage detected