PocketMine-MP 5.27.2 git-d86943fa8c6384be3e2c1901ebf94f584b27e784
Loading...
Searching...
No Matches
vendor/pocketmine/raklib/src/generic/PacketHandlingException.php
1<?php
2
3/*
4 * This file is part of RakLib.
5 * Copyright (C) 2014-2022 PocketMine Team <https://github.com/pmmp/RakLib>
6 *
7 * RakLib is not affiliated with Jenkins Software LLC nor RakNet.
8 *
9 * RakLib is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
13 */
14
15declare(strict_types=1);
16
17namespace raklib\generic;
18
19class PacketHandlingException extends \RuntimeException{
20
22 private int $disconnectReason;
23
27 public function __construct(string $message, int $disconnectReason, int $code = 0, ?\Throwable $previous = null){
28 $this->disconnectReason = $disconnectReason;
29 parent::__construct($message, $code, $previous);
30 }
31
35 public function getDisconnectReason() : int{
36 return $this->disconnectReason;
37 }
38}
__construct(string $message, int $disconnectReason, int $code=0, ?\Throwable $previous=null)