| 1 | <?php |
||
| 15 | class PlayerBountyLostEvent extends Event implements Cancellable |
||
| 16 | { |
||
| 17 | public const TYPE_SUICIDE = 0; |
||
| 18 | public const TYPE_KILLED = 1; |
||
| 19 | |||
| 20 | /** @var Player $Killed */ |
||
| 21 | private $killed; |
||
| 22 | |||
| 23 | /* @var Player $killer */ |
||
| 24 | private $killer = null; |
||
| 25 | |||
| 26 | /* @var int $gold */ |
||
| 27 | private $gold; |
||
| 28 | |||
| 29 | /* @var int $type */ |
||
| 30 | private $type = self::TYPE_SUICIDE; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * PlayerBountyLostEvent constructor. |
||
| 34 | * |
||
| 35 | * @param Player $killed |
||
| 36 | * @param int $gold |
||
| 37 | * @param Player|null $killer |
||
| 38 | * @param int $type |
||
| 39 | */ |
||
| 40 | public function __construct(Player $killed, int $gold, Player $killer = null, int $type = self::TYPE_SUICIDE) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return Player |
||
| 50 | */ |
||
| 51 | public function getKilled(): Player |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return Player|null |
||
| 58 | */ |
||
| 59 | public function getKiller(): ?Player |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @return int |
||
| 66 | */ |
||
| 67 | public function getGold(): int |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @return int |
||
| 74 | */ |
||
| 75 | public function getType(): int |
||
| 79 | } |
||
| 80 |