PlayerManager

This object is responsible for managing player data and actions related to death and revival. It includes a nested class YoloPlayer, which contains the player's UUID and their PlayerStatus data.

Types

Link copied to clipboard
data class DeathBanResult(var successful: Boolean, var latestDeathPos: Location?, var banMessage: Component)

Represents the result of a death-ban. If the attempt lies in the future or in the past, it is context-dependent.

Link copied to clipboard
@ApiStatus.Internal
@Serializable
data class GhostState

Represents an additional state, a player can be in, when teleported upon their revival. Whilst in this state, a player can't be harmed and is invisible, but can't engage in either PvP or PvE, without being forced out of this state. The last part is handled by the PlayerManagerEvents event-listener.

Link copied to clipboard
@Serializable
data class PlayerStatus(var latestDeathPos: Location?, var isDead: Boolean = false, var isToRevive: Boolean = false, var isTeleportToDeathPos: Boolean = true, var isRestoreInventory: Boolean = true, var banMessage: Component = Component.text(""), ghostState: PlayerManager.GhostState = GhostState(false, 0))

This data class represents the status values, tracked by this plugin.

Link copied to clipboard
data class ReviveResult(val successful: Boolean = false, val teleported: Boolean = false, val inventoryRestored: Boolean = false)

Represents the result of a revival attempt. If the attempt lies in the future or in the past, it is context-dependent.

Functions

Link copied to clipboard

Provides a list of the names from every player, that is dead and isn't yet set to be revived. Useful for command tab-completions.