PocketMine-MP 5.28.3 git-d5a1007c80fcee27feb2251cf5dcf1ad5a59a85c
|
Public Member Functions | |
__construct (Entity $entity, private float $amount, private int $cause) | |
call () | |
getAmount () | |
getCause () | |
getEntity () | |
getEventName () | |
isCancelled () | |
setAmount (float $amount) | |
Static Public Member Functions | |
static | hasHandlers () |
Public Attributes | |
const | CAUSE_ATTACK = 1 |
const | CAUSE_CUSTOM = 11 |
const | CAUSE_DAMAGE = 2 |
const | CAUSE_HEALTH_REGEN = 4 |
const | CAUSE_JUMPING = 9 |
const | CAUSE_MINING = 3 |
const | CAUSE_POTION = 5 |
const | CAUSE_SPRINT_JUMPING = 10 |
const | CAUSE_SPRINTING = 7 |
const | CAUSE_SWIMMING = 8 |
const | CAUSE_WALKING = 6 |
Protected Attributes | |
Entity | $entity |
string | $eventName = null |
@phpstan-extends EntityEvent<Entity>
Definition at line 33 of file EntityExhaustEvent.php.
pocketmine\event\entity\EntityExhaustEvent::__construct | ( | Entity | $entity, |
private float | $amount, | ||
private int | $cause ) |
Definition at line 48 of file EntityExhaustEvent.php.
|
inherited |
pocketmine\event\entity\EntityExhaustEvent::getAmount | ( | ) |
Definition at line 56 of file EntityExhaustEvent.php.
pocketmine\event\entity\EntityExhaustEvent::getCause | ( | ) |
Returns an int cause of the exhaustion - one of the constants at the top of this class.
Definition at line 67 of file EntityExhaustEvent.php.
|
inherited |
Reimplemented in pocketmine\event\entity\EntityDeathEvent, pocketmine\event\entity\EntityShootBowEvent, pocketmine\event\entity\ItemDespawnEvent, pocketmine\event\entity\ItemSpawnEvent, pocketmine\event\entity\ProjectileHitEvent, pocketmine\event\entity\ProjectileLaunchEvent, and pocketmine\event\player\PlayerDeathEvent.
Definition at line 43 of file EntityEvent.php.
References pocketmine\event\entity\EntityEvent\$entity.
|
staticinherited |
|
inherited |
Returns whether this instance of the event is currently cancelled.
If it is cancelled, only downstream handlers that declare @handleCancelled
will be called with this event.
pocketmine\event\entity\EntityExhaustEvent::setAmount | ( | float | $amount | ) |
Definition at line 60 of file EntityExhaustEvent.php.
|
protectedinherited |
@phpstan-var TEntity
Definition at line 37 of file EntityEvent.php.
Referenced by pocketmine\event\entity\EntityDamageByBlockEvent\__construct(), pocketmine\event\entity\EntityDamageByChildEntityEvent\__construct(), pocketmine\event\entity\EntityDamageByEntityEvent\__construct(), pocketmine\event\entity\EntityDamageEvent\__construct(), pocketmine\event\entity\EntityDeathEvent\__construct(), pocketmine\event\entity\EntityExplodeEvent\__construct(), pocketmine\event\player\PlayerDeathEvent\__construct(), pocketmine\event\entity\EntityDeathEvent\getEntity(), pocketmine\event\entity\EntityEvent\getEntity(), pocketmine\event\entity\EntityShootBowEvent\getEntity(), pocketmine\event\entity\ItemDespawnEvent\getEntity(), pocketmine\event\entity\ItemSpawnEvent\getEntity(), pocketmine\event\entity\ProjectileHitEvent\getEntity(), and pocketmine\event\entity\ProjectileLaunchEvent\getEntity().
|
protectedinherited |
const pocketmine\event\entity\EntityExhaustEvent::CAUSE_ATTACK = 1 |
Definition at line 36 of file EntityExhaustEvent.php.
const pocketmine\event\entity\EntityExhaustEvent::CAUSE_CUSTOM = 11 |
Definition at line 46 of file EntityExhaustEvent.php.
const pocketmine\event\entity\EntityExhaustEvent::CAUSE_DAMAGE = 2 |
Definition at line 37 of file EntityExhaustEvent.php.
const pocketmine\event\entity\EntityExhaustEvent::CAUSE_HEALTH_REGEN = 4 |
Definition at line 39 of file EntityExhaustEvent.php.
const pocketmine\event\entity\EntityExhaustEvent::CAUSE_JUMPING = 9 |
Definition at line 44 of file EntityExhaustEvent.php.
const pocketmine\event\entity\EntityExhaustEvent::CAUSE_MINING = 3 |
Definition at line 38 of file EntityExhaustEvent.php.
const pocketmine\event\entity\EntityExhaustEvent::CAUSE_POTION = 5 |
Definition at line 40 of file EntityExhaustEvent.php.
const pocketmine\event\entity\EntityExhaustEvent::CAUSE_SPRINT_JUMPING = 10 |
Definition at line 45 of file EntityExhaustEvent.php.
const pocketmine\event\entity\EntityExhaustEvent::CAUSE_SPRINTING = 7 |
Definition at line 42 of file EntityExhaustEvent.php.
const pocketmine\event\entity\EntityExhaustEvent::CAUSE_SWIMMING = 8 |
Definition at line 43 of file EntityExhaustEvent.php.
const pocketmine\event\entity\EntityExhaustEvent::CAUSE_WALKING = 6 |
Definition at line 41 of file EntityExhaustEvent.php.