PocketMine-MP
5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
Loading...
Searching...
No Matches
PlayerExhaustEvent.php
1
<?php
2
3
/*
4
*
5
* ____ _ _ __ __ _ __ __ ____
6
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
7
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
8
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
9
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
10
*
11
* This program is free software: you can redistribute it and/or modify
12
* it under the terms of the GNU Lesser General Public License as published by
13
* the Free Software Foundation, either version 3 of the License, or
14
* (at your option) any later version.
15
*
16
* @author PocketMine Team
17
* @link http://www.pocketmine.net/
18
*
19
*
20
*/
21
22
declare(strict_types=1);
23
24
namespace
pocketmine\event\player
;
25
26
use
pocketmine\entity\Human
;
27
use
pocketmine\event\Cancellable
;
28
use pocketmine\event\CancellableTrait;
29
use
pocketmine\event\entity\EntityEvent
;
30
34
class
PlayerExhaustEvent
extends
EntityEvent
implements
Cancellable
{
35
use
CancellableTrait
;
36
37
public
const
CAUSE_ATTACK = 1;
38
public
const
CAUSE_DAMAGE = 2;
39
public
const
CAUSE_MINING = 3;
40
public
const
CAUSE_HEALTH_REGEN = 4;
41
public
const
CAUSE_POTION = 5;
42
public
const
CAUSE_WALKING = 6;
43
public
const
CAUSE_SPRINTING = 7;
44
public
const
CAUSE_SWIMMING = 8;
45
public
const
CAUSE_JUMPING = 9;
46
public
const
CAUSE_SPRINT_JUMPING = 10;
47
public
const
CAUSE_CUSTOM = 11;
48
49
public
function
__construct(
50
protected
Human
$human,
51
private
float
$amount,
52
private
int
$cause
53
){
54
$this->entity = $human;
55
}
56
60
public
function
getPlayer
(){
61
return
$this->human;
62
}
63
64
public
function
getAmount() : float{
65
return $this->amount;
66
}
67
68
public
function
setAmount(
float
$amount) : void{
69
$this->amount = $amount;
70
}
71
75
public
function
getCause
() : int{
76
return $this->cause;
77
}
78
}
pocketmine\entity\Human
Definition
Human.php:80
pocketmine\event\entity\EntityEvent
Definition
EntityEvent.php:35
pocketmine\event\player\PlayerExhaustEvent
Definition
PlayerExhaustEvent.php:34
pocketmine\event\player\PlayerExhaustEvent\getPlayer
getPlayer()
Definition
PlayerExhaustEvent.php:60
pocketmine\event\player\PlayerExhaustEvent\getCause
getCause()
Definition
PlayerExhaustEvent.php:75
pocketmine\event\Cancellable
Definition
Cancellable.php:34
pocketmine\event\player
Definition
PlayerBedEnterEvent.php:24
pocketmine\event\CancellableTrait
trait CancellableTrait
Definition
CancellableTrait.php:34
src
event
player
PlayerExhaustEvent.php
Generated by
1.12.0