类 DataBaseOperate
java.lang.Object
top.redstarmc.plugin.velocitytitle.velocity.database.DataBaseOperate
数据库操作
各种数据库操作的方法,全部为静态方法
使用
各种数据库操作的方法,全部为静态方法
使用
SQLManager 进行各种操作-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static @NotNull CompletableFuture<CommandResp> deleteTitle(String title_name) 从称号库删除一个称号static @NotNull CompletableFuture<CommandResp> divideTitleToPlayer(@NotNull String title_name, @NotNull String player_name) 分配称号给玩家static @NotNull CompletableFuture<CommandResp> insertTitle(String title_name, String display, String description, boolean isPrefix) 将一个新称号加入称号库static CompletableFuture<CommandResp> playerPickTitle(String player_uuid, TitleType type) 摘除前缀或后缀static @NotNull CompletableFuture<Title> playerWoreTitle(String player_uuid, boolean isPrefix) 获得玩家当前穿戴的称号static @NotNull CompletableFuture<CommandResp> queryTitleOfPlayer(String player_uuid, int title_id) 查询玩家是否拥有指定的称号(CompletableFuture)static @NotNull CompletableFuture<CommandResp> revokeTitleFromPlayer(@NotNull String title_name, @NotNull String player_name) 收回玩家的称号static @NotNull CompletableFuture<Void> savePlayer(String player_uuid, String player_name) 向数据库保存玩家的UUID以便离线操作static CompletableFuture<List<Title>> selectPlayerTitleList(com.velocitypowered.api.command.CommandSource source, String player_uuid) 查询玩家拥有的称号的列表static @NotNull CompletableFuture<String> selectPlayerUUID(String player_name) 通过玩家名称获得离线玩家的UUIDstatic CompletableFuture<List<Title>> selectTitleList(com.velocitypowered.api.command.CommandSource source) 查询称号列表static @NotNull CompletableFuture<Title> selectTitleWithID(int title_id) 使用称号 ID 查询称号信息(CompletableFuture)static @NotNull CompletableFuture<Title> selectTitleWithName(String title_name) 使用称号名称查询称号信息static @NotNull CompletableFuture<CommandResp> updateTitle(String title_name, TitleInfoType type, String data) 更新称号信息static @NotNull CompletableFuture<CommandResp> 穿戴称号操作
-
构造器详细资料
-
DataBaseOperate
public DataBaseOperate()
-
-
方法详细资料
-
selectTitleWithName
使用称号名称查询称号信息- 参数:
title_name- 称号名称- 返回:
- CompletableFuture
- 异步返回查询结果
-
selectTitleWithID
使用称号 ID 查询称号信息(CompletableFuture)- 参数:
title_id- 称号ID- 返回:
- CompletableFuture
- 异步返回查询结果
-
queryTitleOfPlayer
@NotNull public static @NotNull CompletableFuture<CommandResp> queryTitleOfPlayer(String player_uuid, int title_id) 查询玩家是否拥有指定的称号(CompletableFuture)- 参数:
player_uuid- 玩家UUIDtitle_id- 称号ID,自增主键,为int类型- 返回:
- CompletableFuture
-
selectPlayerUUID
通过玩家名称获得离线玩家的UUID- 参数:
player_name- 玩家名称- 返回:
- 玩家UUID
-
savePlayer
@NotNull public static @NotNull CompletableFuture<Void> savePlayer(String player_uuid, String player_name) 向数据库保存玩家的UUID以便离线操作- 参数:
player_uuid- 玩家 UUIDplayer_name- 玩家名
-
playerWoreTitle
@NotNull public static @NotNull CompletableFuture<Title> playerWoreTitle(String player_uuid, boolean isPrefix) 获得玩家当前穿戴的称号- 参数:
player_uuid- 玩家的 UUIDisPrefix- 是否为前缀- 返回:
- 称号实例
-
insertTitle
@NotNull public static @NotNull CompletableFuture<CommandResp> insertTitle(String title_name, String display, String description, boolean isPrefix) 将一个新称号加入称号库- 参数:
title_name- 称号名称display- 实际的展示内容description- 描述isPrefix- 是否为前缀- 返回:
- CompletableFuture
- 异步返回结果
-
updateTitle
@NotNull public static @NotNull CompletableFuture<CommandResp> updateTitle(String title_name, TitleInfoType type, String data) 更新称号信息- 参数:
title_name- 称号名称type- 类型TitleInfoTypedata- 要更新成的新数据
-
deleteTitle
从称号库删除一个称号- 参数:
title_name- 称号名称
-
divideTitleToPlayer
@NotNull public static @NotNull CompletableFuture<CommandResp> divideTitleToPlayer(@NotNull @NotNull String title_name, @NotNull @NotNull String player_name) 分配称号给玩家- 参数:
title_name- 称号名称player_name- 要给的玩家的名字
-
revokeTitleFromPlayer
@NotNull public static @NotNull CompletableFuture<CommandResp> revokeTitleFromPlayer(@NotNull @NotNull String title_name, @NotNull @NotNull String player_name) 收回玩家的称号- 参数:
title_name- 称号名称player_name- 被执行玩家的名字
-
wearTitle
@NotNull public static @NotNull CompletableFuture<CommandResp> wearTitle(String title_name, String player_name) 穿戴称号操作- 参数:
title_name- 称号名称player_name- 玩家名
-
playerPickTitle
摘除前缀或后缀- 参数:
player_uuid- 被执行玩家 UUIDtype- 称号类型
-
selectPlayerTitleList
public static CompletableFuture<List<Title>> selectPlayerTitleList(com.velocitypowered.api.command.CommandSource source, String player_uuid) 查询玩家拥有的称号的列表- 参数:
source- 命令执行者player_uuid- 玩家uuid- 返回:
- CompletableFuture无效输入:'<'List 无效输入:'<' Title>>
-
selectTitleList
public static CompletableFuture<List<Title>> selectTitleList(com.velocitypowered.api.command.CommandSource source) 查询称号列表- 参数:
source- 命令执行者- 返回:
- CompletableFuture无效输入:'<'List 无效输入:'<' Title>>
-