mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 19:24:12 +00:00
Added more methods to PlayerIllegalMoveEvent
This commit is contained in:
@ -36,14 +36,21 @@ class PlayerIllegalMoveEvent extends PlayerCheatEvent implements Cancellable{
|
||||
|
||||
/** @var Vector3 */
|
||||
private $attemptedPosition;
|
||||
/** @var Vector3 */
|
||||
private $originalPosition;
|
||||
/** @var Vector3 */
|
||||
private $expectedPosition;
|
||||
|
||||
/**
|
||||
* @param Player $player
|
||||
* @param Vector3 $attemptedPosition
|
||||
* @param Vector3 $originalPosition
|
||||
*/
|
||||
public function __construct(Player $player, Vector3 $attemptedPosition){
|
||||
$this->attemptedPosition = $attemptedPosition;
|
||||
public function __construct(Player $player, Vector3 $attemptedPosition, Vector3 $originalPosition){
|
||||
$this->player = $player;
|
||||
$this->attemptedPosition = $attemptedPosition;
|
||||
$this->originalPosition = $originalPosition;
|
||||
$this->expectedPosition = $player->asVector3();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -54,4 +61,17 @@ class PlayerIllegalMoveEvent extends PlayerCheatEvent implements Cancellable{
|
||||
return $this->attemptedPosition;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Vector3
|
||||
*/
|
||||
public function getOriginalPosition() : Vector3{
|
||||
return $this->originalPosition;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Vector3
|
||||
*/
|
||||
public function getExpectedPosition() : Vector3{
|
||||
return $this->expectedPosition;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user