changeOutcome

fun changeOutcome(isToRevive: Boolean, isTeleportToDeathPos: Boolean, isRestoreInventory: Boolean, by: Plugin, isSilent: Boolean = false, reason: String? = null)

Changes the outcome of the process depending on the new parameters given.

Note that this has no direct effect on the player's (Yolo internal) status and only on the revive-attempt, that emitted the event. However, should the attempt succeed, the isDead and isToRevive flags are updated to false. You can check the outcome via YoloPlayerRevivedEvent (or it's asynchronous variant) and react accordingly.

Parameters

isToRevive

Whether to revive the player at all

isTeleportToDeathPos

Whether to teleport the player to the location of their last death

isRestoreInventory

Whether to restore the inventory.

by

What plugin this change is coming from. (← Your plugin's main class here)

isSilent

Whether to mute the console message, stating the changes and source of the changes. false by default

reason

Optionally a reason, why the change was made. null by default