mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
PlayerPreLoginEvent no longer implements Cancellable
please see #5516 for motivation on this, but I don't think anyone will be complaining - this behaviour made no sense and caused a lot of confusion for people who were trying to set custom ban messages.
This commit is contained in:
parent
074e7586cb
commit
5d0388e747
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\event\player;
|
||||
|
||||
use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\Event;
|
||||
use pocketmine\lang\Translatable;
|
||||
use pocketmine\player\PlayerInfo;
|
||||
@ -40,7 +39,7 @@ use function count;
|
||||
* WARNING: Any information about the player CANNOT be trusted at this stage, because they are not authenticated and
|
||||
* could be a hacker posing as another player.
|
||||
*/
|
||||
class PlayerPreLoginEvent extends Event implements Cancellable{
|
||||
class PlayerPreLoginEvent extends Event{
|
||||
public const KICK_REASON_PLUGIN = 0;
|
||||
public const KICK_REASON_SERVER_FULL = 1;
|
||||
public const KICK_REASON_SERVER_WHITELISTED = 2;
|
||||
@ -160,8 +159,4 @@ class PlayerPreLoginEvent extends Event implements Cancellable{
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public function isCancelled() : bool{
|
||||
return !$this->isAllowed();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user