Skip to content

EntityDismountEvent 5.46.0 ​

class · pocketmine\event\entity\EntityDismountEvent · source

Extends EntityEvent
Implements Cancellable

Called when an entity is about to stop riding its vehicle. Dismounts that can't be refused (the rider or the vehicle died, despawned, teleported or changed world) are not cancellable: cancelling them has no effect.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Entity $entity, \pocketmine\entity\Entity $vehicle, bool $forced)

getVehicle() ​

php
public function getVehicle() : \pocketmine\entity\Entity

isForced() ​

php
public function isForced() : bool

Returns whether the dismount happens anyway, whatever the event result.

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