PlayerManager

Manages all Player related methods.

Functions

Link copied to clipboard
abstract fun changeGamemode(    player: Player,     newGameMode: GameMode,     silent: Boolean,     executor: CommandSender? = null,     sendMessage: Boolean = true)

Change a players gamemode to a new gamemode.

Link copied to clipboard
abstract fun disableFlight(    player: Player,     silent: Boolean,     executor: CommandSender? = null,     sendMessage: Boolean = true)

Disable a players flight.

Link copied to clipboard
abstract fun enableFlight(    player: Player,     silent: Boolean,     executor: CommandSender? = null,     sendMessage: Boolean = true)

Enable flight for a player.

Link copied to clipboard
abstract fun feedPlayer(    player: Player,     silent: Boolean,     executor: CommandSender? = null)

Feed a player

Link copied to clipboard
abstract fun getName(uuid: UUID): Component

Get a players name from their uuid - Sample shows a join listener that uses the getName method.

Link copied to clipboard
abstract fun getPlayerCompletions(input: String): MutableList<String>

Get a list of Player Names that can be used in tab completions.

Link copied to clipboard
abstract fun getTargetPlayer(input: String): Player?

Get a target player from their name.

Link copied to clipboard
abstract fun healPlayer(    player: Player,     silent: Boolean,     executor: CommandSender? = null,     sendMessage: Boolean = true)

Heal a given player

Link copied to clipboard
abstract fun repair(    player: Player,     silent: Boolean,     executor: CommandSender? = null,     sendMessage: Boolean = true)

Method to repair a players item in hand.

Link copied to clipboard
abstract fun repairAll(    player: Player,     silent: Boolean,     executor: CommandSender? = null,     sendMessage: Boolean = true)

Method to repair all things in a players inventory.

Link copied to clipboard
abstract fun setFlySpeed(    player: Player,     speed: Int,     silent: Boolean,     executor: CommandSender? = null,     sendMessage: Boolean = true)

Set the flyspeed for a player.

Link copied to clipboard
abstract fun setNickName(    uuid: UUID,     nickName: String?,     silent: Boolean,     storageManager: StorageManager,     executor: CommandSender? = null)

Set a players nickname.

Link copied to clipboard
abstract fun setWalkSpeed(    player: Player,     speed: Int,     silent: Boolean,     executor: CommandSender? = null,     sendMessage: Boolean = true)

Set the walkspeed for a player.

Link copied to clipboard
abstract fun teleportToSpawn(player: Player)

Teleport a player to spawn

Link copied to clipboard
open fun toggleFlight(    player: Player,     silent: Boolean,     executor: CommandSender? = null,     sendMessage: Boolean = true)

Toggle flight for a player.

Link copied to clipboard
abstract fun warpPlayer(player: Player, name: String): Boolean

Method to warp a player to a warp.