类 PlayerWarpApi

java.lang.Object
cn.handyplus.warp.api.PlayerWarpApi

public final class PlayerWarpApi extends Object
API
从以下版本开始:
1.4.3
  • 方法详细资料

    • getWarpOwnerPlayer

      public static UUID getWarpOwnerPlayer(Integer warpId)
      根据地标id获取对标所有者
      参数:
      warpId - 地标id
      返回:
      玩家uid
      从以下版本开始:
      1.4.3
    • getWarpInfo

      public static Optional<WarpPlayer> getWarpInfo(Integer warpId)
      根据地标ID获取地标信息
      参数:
      warpId - 地标id
      返回:
      地标信息
      从以下版本开始:
      1.4.3
    • setPlayerWarpDisplay

      public static void setPlayerWarpDisplay(@NotNull @NotNull UUID playerUuid, boolean display)
      设置玩家全部地标显示状态
      参数:
      playerUuid - 玩家uuid
      display - 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

      @NotNull public static @NotNull List<WarpPlayer> getAllWarps()
      获取全部地标
      返回:
      全部地标
      从以下版本开始:
      2.5.1
    • searchByName

      @NotNull public static @NotNull List<WarpPlayer> searchByName(@NotNull @NotNull String warpName)
      按名称模糊搜索地标
      参数:
      warpName - 地标名称
      返回:
      匹配的地标
      从以下版本开始:
      2.5.1
    • getPlayerWarps

      @NotNull public static @NotNull List<WarpPlayer> getPlayerWarps(@NotNull @NotNull UUID playerUuid)
      获取玩家的全部地标
      参数:
      playerUuid - 玩家uuid
      返回:
      玩家的全部地标
      从以下版本开始:
      2.5.1
    • getFavoriteWarps

      @NotNull public static @NotNull List<WarpPlayer> getFavoriteWarps(@NotNull @NotNull UUID playerUuid)
      获取玩家收藏的全部地标
      参数:
      playerUuid - 玩家uuid
      返回:
      玩家收藏的全部地标
      从以下版本开始:
      2.5.1
    • isFavorite

      public static boolean isFavorite(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull Integer warpId)
      查询玩家是否已收藏地标
      参数:
      playerUuid - 玩家uuid
      warpId - 地标id
      返回:
      true已收藏,false未收藏
      从以下版本开始:
      2.5.1
    • addFavorite

      public static boolean addFavorite(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull Integer warpId)
      添加玩家收藏
      参数:
      playerUuid - 玩家uuid
      warpId - 地标id
      返回:
      true添加成功,false地标不存在、已收藏或无法获取玩家名称
      从以下版本开始:
      2.5.1
    • removeFavorite

      public static boolean removeFavorite(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull Integer warpId)
      取消玩家收藏
      参数:
      playerUuid - 玩家uuid
      warpId - 地标id
      返回:
      true取消成功,false未收藏
      从以下版本开始:
      2.5.1
    • 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