类 PlayerWarpApi
java.lang.Object
cn.handyplus.warp.api.PlayerWarpApi
-
方法概要
修饰符和类型方法说明static booleanaddFavorite(@NotNull UUID playerUuid, @NotNull Integer warpId) 添加玩家收藏static booleandeleteWarp(@NotNull org.bukkit.entity.Player player, @NotNull Integer warpId) 删除玩家自己的地标static @NotNull List<WarpPlayer> 获取全部地标static @NotNull List<WarpPlayer> getFavoriteWarps(@NotNull UUID playerUuid) 获取玩家收藏的全部地标static @NotNull List<WarpPlayer> getPlayerWarps(@NotNull UUID playerUuid) 获取玩家的全部地标static Optional<WarpPlayer> getWarpInfo(Integer warpId) 根据地标ID获取地标信息static UUIDgetWarpOwnerPlayer(Integer warpId) 根据地标id获取对标所有者static booleanisFavorite(@NotNull UUID playerUuid, @NotNull Integer warpId) 查询玩家是否已收藏地标static booleanremoveFavorite(@NotNull UUID playerUuid, @NotNull Integer warpId) 取消玩家收藏static @NotNull List<WarpPlayer> searchByName(@NotNull String warpName) 按名称模糊搜索地标static voidsetCreateFlag(org.bukkit.entity.Player player, boolean createFlag, String tipMsg) 设置是否可创建标识static voidsetPlayerWarpDisplay(@NotNull UUID playerUuid, boolean display) 设置玩家全部地标显示状态static void根据地标id传送玩家
-
方法详细资料
-
getWarpOwnerPlayer
-
getWarpInfo
根据地标ID获取地标信息- 参数:
warpId- 地标id- 返回:
- 地标信息
- 从以下版本开始:
- 1.4.3
-
setPlayerWarpDisplay
设置玩家全部地标显示状态- 参数:
playerUuid- 玩家uuiddisplay- true显示 false隐藏- 从以下版本开始:
- 2.4.2
-
setCreateFlag
public static void setCreateFlag(org.bukkit.entity.Player player, boolean createFlag, String tipMsg) 设置是否可创建标识- 参数:
player- 玩家createFlag- 创建标识 true可以创建 false不可以创建tipMsg- 禁止创建提醒的消息内容- 从以下版本开始:
- 1.4.4
-
getAllWarps
-
searchByName
按名称模糊搜索地标- 参数:
warpName- 地标名称- 返回:
- 匹配的地标
- 从以下版本开始:
- 2.5.1
-
getPlayerWarps
获取玩家的全部地标- 参数:
playerUuid- 玩家uuid- 返回:
- 玩家的全部地标
- 从以下版本开始:
- 2.5.1
-
getFavoriteWarps
@NotNull public static @NotNull List<WarpPlayer> getFavoriteWarps(@NotNull @NotNull UUID playerUuid) 获取玩家收藏的全部地标- 参数:
playerUuid- 玩家uuid- 返回:
- 玩家收藏的全部地标
- 从以下版本开始:
- 2.5.1
-
isFavorite
-
addFavorite
-
removeFavorite
-
teleport
public static void teleport(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull Integer warpId) 根据地标id传送玩家- 参数:
player- 玩家warpId- 地标id- 从以下版本开始:
- 2.5.1
-
deleteWarp
public static boolean deleteWarp(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull Integer warpId) 删除玩家自己的地标- 参数:
player- 玩家warpId- 地标id- 返回:
- true删除成功,false地标不存在或不属于该玩家
- 从以下版本开始:
- 2.5.1
-