VitalPlayerRepository

Global repository; stores all instances of VitalPlayer. Use this class to retrieve your custom instances.

It is ill-advised to modify the contents of this repository manually. Vital will automatically create new instances of your configured VitalPlayer class when a player joins and also automatically delete any instance when a player leaves.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun delete(entity: VitalPlayer<*>)
Link copied to clipboard
Link copied to clipboard
inline fun <T : VitalEntity<UUID>> find(predicate: Predicate<T>): T?
fun <T : VitalEntity<UUID>> find(type: Class<T>, predicate: Predicate<T>): T?
Link copied to clipboard
inline fun <T : VitalEntity<UUID>> findAll(): List<T>
fun <T : VitalEntity<UUID>> findAll(type: Class<T>): List<T>
Link copied to clipboard
inline fun <T : VitalEntity<UUID>> findById(id: UUID): T?
fun <T : VitalEntity<UUID>> findById(type: Class<T>, id: UUID): T?
Link copied to clipboard
Link copied to clipboard
fun <X : VitalPlayer<*>> save(entity: X): X
Link copied to clipboard
fun saveAll(entities: List<VitalPlayer<*>>)