mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 17:06:16 +00:00
Added extra Exceptions
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
namespace pocketmine\level;
|
||||
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\utils\LevelException;
|
||||
|
||||
class Position extends Vector3{
|
||||
|
||||
@ -139,11 +140,11 @@ class Position extends Vector3{
|
||||
*
|
||||
* @return Position
|
||||
*
|
||||
* @throws \RuntimeException
|
||||
* @throws LevelException
|
||||
*/
|
||||
public function getSide($side, $step = 1){
|
||||
if(!$this->isValid()){
|
||||
throw new \RuntimeException("Undefined Level reference");
|
||||
throw new LevelException("Undefined Level reference");
|
||||
}
|
||||
|
||||
return Position::fromObject(parent::getSide($side, $step), $this->level);
|
||||
|
Reference in New Issue
Block a user