VitalPlayerService

class VitalPlayerService(vitalPlayerRepository: VitalPlayerRepository)

Internal class; used to create and destroy custom instances of VitalPlayer that are configured via vital.players.player-class-name.

Constructors

Link copied to clipboard
constructor(vitalPlayerRepository: VitalPlayerRepository)

Functions

Link copied to clipboard
fun <T : Any> createPlayer(player: T, playerUniqueId: UUID, playerClass: Class<T>, vitalPlayerClass: Class<out VitalPlayer<*>>): VitalPlayer<*>

Creates and saves a new instance of the specified custom VitalPlayer class.

Link copied to clipboard
fun deletePlayer(playerUniqueId: UUID)

Deletes the custom VitalPlayer instance from the global VitalPlayerRepository that matches the given playerUniqueId.