Skip to content
This repository was archived by the owner on Feb 8, 2019. It is now read-only.

Commit 8c584ff

Browse files
committed
Add PlayerMaxXpChangeEvent
1 parent 240d13c commit 8c584ff

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
/**
3+
* Copyright (c) 2018 VectorNetworkProject. All rights reserved. MIT license.
4+
*
5+
* GitHub: https://github.com/VectorNetworkProject/TheMix
6+
* Website: https://www.vector-network.tk
7+
*/
8+
9+
namespace VectorNetworkProject\TheMix\event\game;
10+
11+
use pocketmine\event\Cancellable;
12+
use pocketmine\event\player\PlayerEvent;
13+
use pocketmine\Player;
14+
15+
class PlayerChangeMaxXpEvent extends PlayerEvent implements Cancellable
16+
{
17+
/* @var int $max */
18+
private $max;
19+
20+
/**
21+
* PlayerChangeMaxXpEvent constructor.
22+
*
23+
* @param Player $player
24+
* @param int $max
25+
*/
26+
public function __construct(Player $player, int $max)
27+
{
28+
$this->player = $player;
29+
$this->max = $max;
30+
}
31+
32+
/**
33+
* MaxXPを返します。
34+
*
35+
* @return int
36+
*/
37+
public function getMax(): int
38+
{
39+
return $this->max;
40+
}
41+
}

0 commit comments

Comments
 (0)