🎉 [精灵]CompanionsPlus v3.0.0 版本已发布 ✨ 点击查看
Skip to content

API ​

API作用 ​

非常欢迎对接本插件开发更多附属插件,如有需要更多API可跟我联系添加

3.0.0 提供 cn.handyplus.companions.api.CompanionsPlusApi,可通过 giveCompanion(Player, String) 发放精灵,或使用 giveCompanion(Player, String, boolean) 选择是否立即启用。返回新增精灵实例 ID;配置不存在、仓库已满或入库失败时返回 -1,默认不自动启用。

一、引入API依赖包 ​

xml
<repository>
    <id>handyplus-maven</id>
    <url>https://maven.cnb.cool/handyplus/maven/-/packages/</url>
</repository>

<dependency>
    <groupId>cn.handyplus.companions</groupId>
    <artifactId>CompanionsPlus</artifactId>
    <version>3.0.0</version>
    <scope>provided</scope>
</dependency>

二、具体方法查看 ​

javadoc