Skip to content

on_xp_gain

fun RiftPlugin.on_xp_gain(behaviour: XpGain.(subject: Entity) -> Unit)
XpGain.(subject: Entity) -> Unit

Entity

Example
on_xp_gain { player ->
if (amount >= 100.0) player.message("A big ${skill.name} gain: $amount xp.")
}
val skill: Skill
val amount: Double
var producedOn: Int

fun RiftPlugin.on_xp_gain(
skill: String,
behaviour: XpGain.(subject: Entity) -> Unit
)
XpGain.(subject: Entity) -> Unit

Entity

skill: String
val skill: Skill
val amount: Double
var producedOn: Int