类 CompanionsPlusApi
java.lang.Object
cn.handyplus.companions.api.CompanionsPlusApi
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明intgiveCompanion(@NotNull org.bukkit.entity.Player player, @NotNull String companionKey) 给予玩家指定精灵, 写入数据库但不自动切换为使用中。intgiveCompanion(@NotNull org.bukkit.entity.Player player, @NotNull String companionKey, boolean setActive) 给予玩家指定精灵, 写入数据库并可选立即切换为使用中。
-
构造器详细资料
-
CompanionsPlusApi
public CompanionsPlusApi()
-
-
方法详细资料
-
giveCompanion
public int giveCompanion(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String companionKey) 给予玩家指定精灵, 写入数据库但不自动切换为使用中。- 参数:
player- 玩家companionKey- 精灵种类 KEY- 返回:
- 新增精灵实例 ID; 仓库已满、精灵配置不存在或入库失败时返回 -1
-
giveCompanion
public int giveCompanion(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String companionKey, boolean setActive) 给予玩家指定精灵, 写入数据库并可选立即切换为使用中。- 参数:
player- 玩家companionKey- 精灵种类 KEYsetActive- 是否立即设为使用中- 返回:
- 新增精灵实例 ID; 仓库已满、精灵配置不存在或入库失败时返回 -1
-