类 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(String buffType, String buffTypeName, String pluginName)
      新增称号Buff类型
      参数:
      buffType - buff类型
      buffTypeName - buff类型名称
      pluginName - 注册插件名称
      返回:
      true/成功
      从以下版本开始:
      2.8.4
    • findByTitleId

      public boolean findByTitleId(Long titleId)
      查询称号
      参数:
      titleId - 称号唯一编号id
      返回:
      true/存在
    • add

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

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

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

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

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

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

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

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

      @Deprecated public boolean set(String playerName, Long titleId, int day)
      已过时。
      给玩家称号
      参数:
      playerName - 玩家名
      titleId - 称号编码
      day - 时间,0为永久
      返回:
      true/成功
    • set

      public boolean set(String playerName, Long titleId)
      给玩家称号
      参数:
      playerName - 玩家名
      titleId - 称号编码
      返回:
      true/成功
      从以下版本开始:
      1.10.1
    • set

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

      @Deprecated public boolean removePlayerTitle(String playerName, Long titleId)
      已过时。
      根据titleId和玩家名删除 玩家对应称号
      参数:
      playerName - 玩家名
      titleId - 称号id
      返回:
      true成功
      从以下版本开始:
      2.10.1
    • removePlayerTitle

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

      @Deprecated public TitlePlayer findByPlayerNameAndIsUse(org.bukkit.entity.Player player)
      已过时。
      获取玩家正在使用的展示称号信息
      参数:
      player - 玩家
      返回:
      展示称号
    • findByPlayerUuidAndIsUse

      public TitlePlayer findByPlayerUuidAndIsUse(org.bukkit.entity.Player player)
      获取玩家正在使用的展示称号信息
      参数:
      player - 玩家
      返回:
      展示称号
      从以下版本开始:
      4.0.0
    • findByPlayerNameAndIsUseBuff

      @Deprecated public TitlePlayer findByPlayerNameAndIsUseBuff(org.bukkit.entity.Player player)
      已过时。
      获取玩家正在使用的属性称号信息
      参数:
      player - 玩家
      返回:
      属性称号
      从以下版本开始:
      3.3.0
    • findByPlayerUuidAndIsUseBuff

      public TitlePlayer findByPlayerUuidAndIsUseBuff(org.bukkit.entity.Player player)
      获取玩家正在使用的属性称号信息
      参数:
      player - 玩家
      返回:
      属性称号
      从以下版本开始:
      4.0.0
    • findByPlayerNameAndIsUseParticle

      @Deprecated public TitlePlayer findByPlayerNameAndIsUseParticle(org.bukkit.entity.Player player)
      已过时。
      获取玩家正在使用的粒子称号信息
      参数:
      player - 玩家
      返回:
      粒子称号
      从以下版本开始:
      3.3.0
    • findByPlayerUuidAndIsUseParticle

      public TitlePlayer findByPlayerUuidAndIsUseParticle(org.bukkit.entity.Player player)
      获取玩家正在使用的粒子称号信息
      参数:
      player - 玩家
      返回:
      粒子称号
      从以下版本开始:
      4.0.0
    • getPlayerCoinNum

      @Deprecated public Long getPlayerCoinNum(String playerName)
      已过时。
      获取玩家称号币
      参数:
      playerName - 玩家名
      返回:
      称号币
    • addCoin

      @Deprecated public boolean addCoin(String playerName, Long amount)
      已过时。
      增加玩家称号币
      参数:
      playerName - 玩家名
      amount - 数量
      返回:
      true/成功
    • subtractCoin

      @Deprecated public boolean subtractCoin(String playerName, Long amount)
      已过时。
      减少玩家称号币
      参数:
      playerName - 玩家名
      amount - 数量
      返回:
      true/成功
    • getPlayerCoinNum

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

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

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

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

      @Deprecated public Integer getPlayerTitleNum(String playerName)
      已过时。
      获取玩家称号数量
      参数:
      playerName - 玩家名
      返回:
      称号数量
    • getPlayerTitleNum

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

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

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

      @Deprecated public boolean playerExistTitleId(String playerName, Integer titleId)
      已过时。
      玩家是否有对应的称号ID
      参数:
      playerName - 玩家名称
      titleId - 称号id
      返回:
      true 有, false 无
      从以下版本开始:
      3.1.1
    • playerExistTitleId

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

      @Deprecated public List<Integer> findAllTitleIdByPlayerName(String playerName)
      已过时。
      获取玩家所有称号ID
      参数:
      playerName - 玩家名称
      返回:
      所有称号ID
      从以下版本开始:
      3.4.1
    • findAllTitleIdByPlayerUuid

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