类 PlayerTitleApi

java.lang.Object
com.handy.playertitle.api.PlayerTitleApi

public class PlayerTitleApi extends Object
PlayerTitleApi
从以下版本开始:
2.7.9
  • 方法详细资料

    • getInstance

      public static PlayerTitleApi getInstance()
    • addBuffType

      public boolean addBuffType(@NotNull @NotNull String buffType, @NotNull @NotNull String buffTypeName, @NotNull @NotNull String pluginName)
      新增称号Buff类型
      参数:
      buffType - buff类型
      buffTypeName - buff类型名称
      pluginName - 注册插件名称
      返回:
      true/成功
      从以下版本开始:
      2.8.4
    • findByTitleId

      public boolean findByTitleId(@NotNull @NotNull Integer titleId)
      查询称号是否存在
      参数:
      titleId - 称号唯一编号id
      返回:
      true/存在
    • findTitleById

      public Optional<TitleList> findTitleById(@NotNull @NotNull Integer titleId)
      查询称号信息
      参数:
      titleId - 称号唯一编号id
      返回:
      称号信息包含buff和粒子
      从以下版本开始:
      4.7.9
    • add

      public Integer add(@NotNull @NotNull TitleListParam titleListParam)
      新增称号
      参数:
      titleListParam - 入参
      返回:
      称号唯一编号id,请保存好
    • removeTitle

      public boolean removeTitle(@NotNull @NotNull Integer titleId)
      删除称号
      参数:
      titleId - 称号id
      返回:
      true/成功
      从以下版本开始:
      2.10.1
    • addTitleBuff

      public boolean addTitleBuff(@NotNull @NotNull Integer titleId, @NotNull @NotNull List<TitleBuffParam> titleBuffs)
      添加称号buff
      参数:
      titleId - 称号id
      titleBuffs - 称号buff
      返回:
      true/成功
    • removeTitleBuff

      public boolean removeTitleBuff(@NotNull @NotNull Integer titleId)
      删除称号buff
      参数:
      titleId - 称号id
      返回:
      true/成功
    • addTitleParticle

      public boolean addTitleParticle(@NotNull @NotNull Integer titleId, @NotNull @NotNull TitleParticleParam titleParticleParam)
      添加称号粒子
      参数:
      titleId - 称号id
      titleParticleParam - 称号粒子
      返回:
      true/成功
    • removeTitleParticle

      public boolean removeTitleParticle(@NotNull @NotNull Integer titleId)
      删除称号粒子
      参数:
      titleId - 称号id
      返回:
      true/成功
    • update

      public boolean update(@NotNull @NotNull Integer titleId, @NotNull @NotNull String titleName, boolean isPrefixAndSuffix)
      更改名称
      参数:
      titleId - 称号id
      titleName - 称号名称
      isPrefixAndSuffix - 是否使用默认前后缀
      返回:
      true/成功
    • updateDescription

      public boolean updateDescription(@NotNull @NotNull Integer titleId, String description)
      更改描述
      参数:
      titleId - 称号id
      description - 描述
      返回:
      true/成功
    • set

      public boolean set(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull Integer titleId, int day)
      给玩家称号
      参数:
      playerUuid - 玩家uid
      titleId - 称号编码
      day - 时间,0为永久
      返回:
      true/成功
      从以下版本开始:
      4.7.5
    • set

      public boolean set(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull Integer titleId)
      给玩家称号
      参数:
      playerUuid - 玩家uid
      titleId - 称号编码
      返回:
      true/成功
      从以下版本开始:
      4.7.5
    • set

      public boolean set(String playerName, @NotNull @NotNull UUID playerUuid, @NotNull @NotNull Integer titleId, int day)
      给玩家称号
      参数:
      playerName - 玩家名
      playerUuid - 玩家uid
      titleId - 称号编码
      day - 时间,0为永久
      返回:
      true/成功
      从以下版本开始:
      4.0.0
    • removePlayerTitle

      public boolean removePlayerTitle(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull Integer titleId)
      根据titleId和玩家Uid删除 玩家对应称号
      参数:
      playerUuid - 玩家Uid
      titleId - 称号id
      返回:
      true成功
      从以下版本开始:
      2.10.1
    • findByPlayerUuidAndIsUse

      public TitlePlayer findByPlayerUuidAndIsUse(@NotNull @NotNull UUID playerUuid)
      获取玩家正在使用的展示称号信息
      参数:
      playerUuid - 玩家uid
      返回:
      展示称号
      从以下版本开始:
      4.7.5
    • findByPlayerUuidAndIsUseBuff

      public TitlePlayer findByPlayerUuidAndIsUseBuff(@NotNull @NotNull UUID playerUuid)
      获取玩家正在使用的属性称号信息
      参数:
      playerUuid - 玩家uid
      返回:
      属性称号
      从以下版本开始:
      4.7.5
    • findByPlayerUuidAndIsUseParticle

      public TitlePlayer findByPlayerUuidAndIsUseParticle(@NotNull @NotNull UUID playerUuid)
      获取玩家正在使用的粒子称号信息
      参数:
      playerUuid - 玩家uid
      返回:
      粒子称号
      从以下版本开始:
      4.7.5
    • getPlayerCoinNum

      public Integer getPlayerCoinNum(@NotNull @NotNull UUID playerUuid)
      获取玩家称号币
      参数:
      playerUuid - 玩家uid
      返回:
      称号币
      从以下版本开始:
      4.0.0
    • addCoin

      public boolean addCoin(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull Integer amount)
      增加玩家称号币
      参数:
      playerUuid - 玩家uid
      amount - 数量
      返回:
      true/成功
      从以下版本开始:
      4.0.0
    • subtractCoin

      public boolean subtractCoin(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull Integer amount)
      减少玩家称号币
      参数:
      playerUuid - 玩家uid
      amount - 数量
      返回:
      true/成功
      从以下版本开始:
      4.0.0
    • setCoin

      public boolean setCoin(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull Integer amount)
      设置玩家称号币
      参数:
      playerUuid - 玩家uid
      amount - 数量
      返回:
      true/成功
      从以下版本开始:
      4.0.0
    • getPlayerTitleNum

      public Integer getPlayerTitleNum(@NotNull @NotNull UUID playerUuid)
      获取玩家称号数量
      参数:
      playerUuid - 玩家Uid
      返回:
      称号数量
      从以下版本开始:
      4.0.0
    • removeBuff

      public void removeBuff(@NotNull @NotNull org.bukkit.entity.Player player)
      移除buff
      参数:
      player - 玩家
      从以下版本开始:
      2.9.9
    • setBuff

      public void setBuff(@NotNull @NotNull org.bukkit.entity.Player player)
      设置buff
      参数:
      player - 玩家
      从以下版本开始:
      2.9.9
    • playerExistTitleId

      public boolean playerExistTitleId(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull Integer titleId)
      玩家是否有对应的称号ID
      参数:
      playerUuid - 玩家Uid
      titleId - 称号id
      返回:
      true 有, false 无
      从以下版本开始:
      4.0.0
    • findAllTitleIdByPlayerUuid

      public List<Integer> findAllTitleIdByPlayerUuid(@NotNull @NotNull UUID playerUuid)
      获取玩家所有称号ID
      参数:
      playerUuid - 玩家uid
      返回:
      所有称号ID
      从以下版本开始:
      4.0.0
    • findPlayerTitle

      public List<TitlePlayer> findPlayerTitle(@NotNull @NotNull UUID playerUuid)
      获取玩家所有称号
      参数:
      playerUuid - 玩家uid
      返回:
      所有称号
      从以下版本开始:
      4.7.5
    • findShopTitle

      public List<TitleList> findShopTitle(UUID playerUuid)
      获取商店所有称号
      返回:
      所有称号
      从以下版本开始:
      4.7.5
    • playerTitleUse

      public void playerTitleUse(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull Integer titlePlayerId)
      玩家使用称号
      参数:
      player - 玩家
      titlePlayerId - 玩家称号ID
      从以下版本开始:
      4.7.6