PlayerService

class PlayerService(playerRepository: PlayerRepository, statsRepository: StatsRepository, logger: Logger)

Constructors

Link copied to clipboard
constructor(playerRepository: PlayerRepository, statsRepository: StatsRepository, logger: Logger)

Functions

Link copied to clipboard
fun addBalance(uuid: UUID, amount: ULong): Boolean

指定された UUID のプレイヤーに所持金を追加します.

Link copied to clipboard
fun addExperience(uuid: UUID, amount: ULong): Boolean

指定された UUID のプレイヤーに経験値を追加します.

Link copied to clipboard

全てのキャッシュをクリアします.

Link copied to clipboard
fun clearCache(uuid: UUID)

指定された UUID のプレイヤーのキャッシュをクリアします.

Link copied to clipboard

プレイヤーデータを新規作成します.

Link copied to clipboard

指定された UUID のプレイヤーデータが存在するかどうか確認します.

Link copied to clipboard
fun getBalance(uuid: UUID): ULong

指定された UUID のプレイヤーの所持金を取得します.

Link copied to clipboard

指定された UUID のプレイヤーの経験値を取得します.

Link copied to clipboard

指定された UUID のプレイヤーのキルデス比を取得します.

Link copied to clipboard

指定された UUID のプレイヤーの最終ログイン日時を取得します.

Link copied to clipboard
fun getLevel(uuid: UUID): UInt

指定された UUID のプレイヤーのレベルを取得します.

Link copied to clipboard

指定された UUID のプレイヤーデータを取得します.

Link copied to clipboard

指定された UUID のプレイヤーの統計データを取得します.

Link copied to clipboard

指定された UUID のプレイヤーのブロック破壊数を1増加させます.

Link copied to clipboard

指定された UUID のプレイヤーのブロック設置数を1増加させます.

Link copied to clipboard

指定された UUID のプレイヤーのデス数を1増加させます.

Link copied to clipboard

指定された UUID のプレイヤーのキル数を1増加させます.

Link copied to clipboard

指定された UUID のプレイヤーのモブキル数を1増加させます.

Link copied to clipboard
fun loadPlayerData(uuid: UUID)

指定された UUID のプレイヤーデータをキャッシュにロードします.

Link copied to clipboard
fun loadStats(uuid: UUID)

指定された UUID のプレイヤー統計データをキャッシュにロードします.

Link copied to clipboard
fun setBalance(uuid: UUID, amount: ULong): Boolean

指定された UUID のプレイヤーの所持金を設定します.

Link copied to clipboard
fun setExperience(uuid: UUID, amount: ULong): Boolean

指定された UUID のプレイヤーの経験値を設定します.

Link copied to clipboard
fun setLevel(uuid: UUID, level: UInt): Boolean

指定された UUID のプレイヤーのレベルを設定します.

Link copied to clipboard
fun subtractBalance(uuid: UUID, amount: ULong): Boolean

指定された UUID のプレイヤーから所持金を減算します.

Link copied to clipboard
fun transferBalance(fromUuid: UUID, toUuid: UUID, amount: ULong): Boolean

指定された UUID のプレイヤー間で所持金を送金します.

Link copied to clipboard

指定された UUID のプレイヤーの最終ログイン日時を更新します.