VitalPlayerListener

Internal listener; manages VitalPlayer lifecycles.

Inheritors

Types

Link copied to clipboard
class Bungee(val vitalPlayerService: VitalPlayerService, val vitalPlayersConfigurationProperties: VitalPlayersConfigurationProperties) : VitalListener.Bungee, VitalPlayerListener
Link copied to clipboard
class Spigot(val vitalPlayerService: VitalPlayerService, val vitalPlayersConfigurationProperties: VitalPlayersConfigurationProperties) : VitalListener.Spigot, VitalPlayerListener

Functions

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

Internal function; creates a new VitalPlayer instance for the given player and stores it in VitalPlayerRepository. This function throws VitalPlayerException.InvalidClass if the configured custom player class has an invalid signature.

Link copied to clipboard
open fun destroyPlayer(playerUniqueId: UUID)

Destroys the VitalPlayer instance of the given playerUniqueId. If no VitalPlayer instance exists for the given playerUniqueId, this function does nothing.