类 PlayerTitleApi
java.lang.Object
com.handy.playertitle.api.PlayerTitleApi
PlayerTitleApi
- 从以下版本开始:
- 2.7.9
-
方法概要
修饰符和类型方法说明add
(@NotNull TitleListParam titleListParam) 新增称号boolean
addBuffType
(@NotNull String buffType, @NotNull String buffTypeName, @NotNull String pluginName) 新增称号Buff类型boolean
增加玩家称号币boolean
addTitleBuff
(@NotNull Integer titleId, @NotNull List<TitleBuffParam> titleBuffs) 添加称号buffboolean
addTitleParticle
(@NotNull Integer titleId, @NotNull TitleParticleParam titleParticleParam) 添加称号粒子findAllTitleIdByPlayerUuid
(@NotNull UUID playerUuid) 获取玩家所有称号IDfindByPlayerUuidAndIsUse
(@NotNull UUID playerUuid) 获取玩家正在使用的展示称号信息findByPlayerUuidAndIsUseBuff
(@NotNull UUID playerUuid) 获取玩家正在使用的属性称号信息findByPlayerUuidAndIsUseParticle
(@NotNull UUID playerUuid) 获取玩家正在使用的粒子称号信息boolean
findByTitleId
(@NotNull Integer titleId) 查询称号是否存在findPlayerTitle
(@NotNull UUID playerUuid) 获取玩家所有称号findShopTitle
(UUID playerUuid) 获取商店所有称号findTitleById
(@NotNull Integer titleId) 查询称号信息static PlayerTitleApi
getPlayerCoinNum
(@NotNull UUID playerUuid) 获取玩家称号币getPlayerTitleNum
(@NotNull UUID playerUuid) 获取玩家称号数量boolean
playerExistTitleId
(@NotNull UUID playerUuid, @NotNull Integer titleId) 玩家是否有对应的称号IDvoid
playerTitleUse
(@NotNull org.bukkit.entity.Player player, @NotNull Integer titlePlayerId) 玩家使用称号void
removeBuff
(@NotNull org.bukkit.entity.Player player) 移除buffboolean
removePlayerTitle
(@NotNull UUID playerUuid, @NotNull Integer titleId) 根据titleId和玩家Uid删除 玩家对应称号boolean
removeTitle
(@NotNull Integer titleId) 删除称号boolean
removeTitleBuff
(@NotNull Integer titleId) 删除称号buffboolean
removeTitleParticle
(@NotNull Integer titleId) 删除称号粒子boolean
给玩家称号boolean
给玩家称号boolean
给玩家称号void
setBuff
(@NotNull org.bukkit.entity.Player player) 设置buffboolean
设置玩家称号币boolean
subtractCoin
(@NotNull UUID playerUuid, @NotNull Integer amount) 减少玩家称号币boolean
更改名称boolean
updateDescription
(@NotNull Integer titleId, String description) 更改描述
-
方法详细资料
-
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
查询称号是否存在- 参数:
titleId
- 称号唯一编号id- 返回:
- true/存在
-
findTitleById
查询称号信息- 参数:
titleId
- 称号唯一编号id- 返回:
- 称号信息包含buff和粒子
- 从以下版本开始:
- 4.7.9
-
add
新增称号- 参数:
titleListParam
- 入参- 返回:
- 称号唯一编号id,请保存好
-
removeTitle
删除称号- 参数:
titleId
- 称号id- 返回:
- true/成功
- 从以下版本开始:
- 2.10.1
-
addTitleBuff
public boolean addTitleBuff(@NotNull @NotNull Integer titleId, @NotNull @NotNull List<TitleBuffParam> titleBuffs) 添加称号buff- 参数:
titleId
- 称号idtitleBuffs
- 称号buff- 返回:
- true/成功
-
removeTitleBuff
删除称号buff- 参数:
titleId
- 称号id- 返回:
- true/成功
-
addTitleParticle
public boolean addTitleParticle(@NotNull @NotNull Integer titleId, @NotNull @NotNull TitleParticleParam titleParticleParam) 添加称号粒子- 参数:
titleId
- 称号idtitleParticleParam
- 称号粒子- 返回:
- true/成功
-
removeTitleParticle
删除称号粒子- 参数:
titleId
- 称号id- 返回:
- true/成功
-
update
public boolean update(@NotNull @NotNull Integer titleId, @NotNull @NotNull String titleName, boolean isPrefixAndSuffix) 更改名称- 参数:
titleId
- 称号idtitleName
- 称号名称isPrefixAndSuffix
- 是否使用默认前后缀- 返回:
- true/成功
-
updateDescription
更改描述- 参数:
titleId
- 称号iddescription
- 描述- 返回:
- true/成功
-
set
给玩家称号- 参数:
playerUuid
- 玩家uidtitleId
- 称号编码day
- 时间,0为永久- 返回:
- true/成功
- 从以下版本开始:
- 4.7.5
-
set
给玩家称号- 参数:
playerUuid
- 玩家uidtitleId
- 称号编码- 返回:
- true/成功
- 从以下版本开始:
- 4.7.5
-
set
public boolean set(String playerName, @NotNull @NotNull UUID playerUuid, @NotNull @NotNull Integer titleId, int day) 给玩家称号- 参数:
playerName
- 玩家名playerUuid
- 玩家uidtitleId
- 称号编码day
- 时间,0为永久- 返回:
- true/成功
- 从以下版本开始:
- 4.0.0
-
removePlayerTitle
public boolean removePlayerTitle(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull Integer titleId) 根据titleId和玩家Uid删除 玩家对应称号- 参数:
playerUuid
- 玩家UidtitleId
- 称号id- 返回:
- true成功
- 从以下版本开始:
- 2.10.1
-
findByPlayerUuidAndIsUse
获取玩家正在使用的展示称号信息- 参数:
playerUuid
- 玩家uid- 返回:
- 展示称号
- 从以下版本开始:
- 4.7.5
-
findByPlayerUuidAndIsUseBuff
获取玩家正在使用的属性称号信息- 参数:
playerUuid
- 玩家uid- 返回:
- 属性称号
- 从以下版本开始:
- 4.7.5
-
findByPlayerUuidAndIsUseParticle
获取玩家正在使用的粒子称号信息- 参数:
playerUuid
- 玩家uid- 返回:
- 粒子称号
- 从以下版本开始:
- 4.7.5
-
getPlayerCoinNum
获取玩家称号币- 参数:
playerUuid
- 玩家uid- 返回:
- 称号币
- 从以下版本开始:
- 4.0.0
-
addCoin
增加玩家称号币- 参数:
playerUuid
- 玩家uidamount
- 数量- 返回:
- true/成功
- 从以下版本开始:
- 4.0.0
-
subtractCoin
减少玩家称号币- 参数:
playerUuid
- 玩家uidamount
- 数量- 返回:
- true/成功
- 从以下版本开始:
- 4.0.0
-
setCoin
设置玩家称号币- 参数:
playerUuid
- 玩家uidamount
- 数量- 返回:
- true/成功
- 从以下版本开始:
- 4.0.0
-
getPlayerTitleNum
获取玩家称号数量- 参数:
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
- 玩家UidtitleId
- 称号id- 返回:
- true 有, false 无
- 从以下版本开始:
- 4.0.0
-
findAllTitleIdByPlayerUuid
获取玩家所有称号ID- 参数:
playerUuid
- 玩家uid- 返回:
- 所有称号ID
- 从以下版本开始:
- 4.0.0
-
findPlayerTitle
获取玩家所有称号- 参数:
playerUuid
- 玩家uid- 返回:
- 所有称号
- 从以下版本开始:
- 4.7.5
-
findShopTitle
获取商店所有称号- 返回:
- 所有称号
- 从以下版本开始:
- 4.7.5
-
playerTitleUse
public void playerTitleUse(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull Integer titlePlayerId) 玩家使用称号- 参数:
player
- 玩家titlePlayerId
- 玩家称号ID- 从以下版本开始:
- 4.7.6
-