Skip to content

PlayerToggleSneakEvent ​

class · pocketmine\event\player\PlayerToggleSneakEvent · source

Extends PlayerEvent
Implements Cancellable

Properties ​

$isSneakPressed ​

php
public bool $isSneakPressed

$isSneaking ​

php
public bool $isSneaking

Methods ​

__construct() ​

php
public function __construct(\pocketmine\player\Player $player, bool $isSneaking, bool $isSneakPressed)

isSneakPressed() ​

php
public function isSneakPressed() : bool

Returns whether the player is pressing the sneak key. The player may still be sneaking even if this is false due to gameplay mechanics (e.g. releasing sneak while in a 1.5 block high space).

isSneaking() ​

php
public function isSneaking() : bool

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.