menu
#7034589 pocketmine\Server::getPlayerByPrefix(): Argument #1 ($name) must be of type string, bool given, called in phar://C:/Users/Admin/Desktop/Development/Minecraft/Practice/server/plugins/vStaff.phar/src/Versai/vStaff/EventListener.php on line 99

Submitted by PocketMine-MP 4.5.1

General information

Version: 4.5.1
Git commit: d641812c
Plugin involvement: Indirect
Report date: 2022-06-23 12:40:18 +0000 UTC
Server uptime: 0 days 0 hours 3 minutes 26 seconds

System Information

PHP version: 8.0.12
Operating system: win
System banner: Windows NT DESKTOP-FB5472K 10.0 build 19042 (Windows 10) AMD64

Error information

Warning: the vStaff plugin was indirectly involved in this crash. This may be a false positive. Please contact the plugin author before opening a bug ticket.
Message: pocketmine\Server::getPlayerByPrefix(): Argument #1 ($name) must be of type string, bool given, called in phar://C:/Users/Admin/Desktop/Development/Minecraft/Practice/server/plugins/vStaff.phar/src/Versai/vStaff/EventListener.php on line 99
File: pmsrc/src/Server
Line: #615
Error level: TypeError
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
		return $playerPromiseResolver->getPromise();
}

/**
* Returns an online player whose name begins with or equals the given string (case insensitive).
* The closest match will be returned, or null if there are no online matches.
*
* @see Server::getPlayerExact()
*/
public function getPlayerByPrefix(string $name) : ?Player{
$found = null;
$name = strtolower($name);
$delta = PHP_INT_MAX;
foreach($this->getOnlinePlayers() as $player){
if(stripos($player->getName(), $name) === 0){
$curDelta = strlen($player->getName()) - strlen($name);
if($curDelta < $delta){
$found = $player;
$delta = $curDelta;
}
#0 plugins/vStaff.phar/src/Versai/vStaff/EventListener(99): pocketmine\Server->getPlayerByPrefix(true)
#1 pmsrc/src/event/RegisteredListener(60): Versai\vStaff\EventListener->onJoin(object pocketmine\event\player\PlayerJoinEvent#124651)
#2 pmsrc/src/event/Event(62): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\player\PlayerJoinEvent#124651)
#3 pmsrc/src/player/Player(834): pocketmine\event\Event->call()
#4 pmsrc/src/network/mcpe/NetworkSession(704): pocketmine\player\Player->doFirstSpawn()
#5 pmsrc/src/network/mcpe/NetworkSession(697): pocketmine\network\mcpe\NetworkSession->onClientSpawnResponse()
#6 pmsrc/src/network/mcpe/handler/SpawnResponsePacketHandler(35): pocketmine\network\mcpe\NetworkSession->pocketmine\network\mcpe\{closure}()
#7 pmsrc/vendor/pocketmine/bedrock-protocol/src/SetLocalPlayerAsInitializedPacket(42): pocketmine\network\mcpe\handler\SpawnResponsePacketHandler->handleSetLocalPlayerAsInitialized(object pocketmine\network\mcpe\protocol\SetLocalPlayerAsInitializedPacket#123966)
#8 pmsrc/src/network/mcpe/NetworkSession(388): pocketmine\network\mcpe\protocol\SetLocalPlayerAsInitializedPacket->handle(object pocketmine\network\mcpe\handler\SpawnResponsePacketHandler#122660)
#9 pmsrc/src/network/mcpe/NetworkSession(351): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\SetLocalPlayerAsInitializedPacket#123966, string[2] q.)
#10 pmsrc/src/network/mcpe/raklib/RakLibInterface(182): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[49] c*d2.....ao...!.9;....:.._c... .....&&.R._o... ..)
#11 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 1, string[58] ..E..4>......jS......K.U..%z.9.Qz....e.L..........p.......)
#12 pmsrc/src/network/mcpe/raklib/RakLibInterface(112): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#28845)
#13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#15 pmsrc/src/Server(1703): pocketmine\snooze\SleeperHandler->sleepUntil(float 1655988017.6159)
#16 pmsrc/src/Server(1063): pocketmine\Server->tickProcessor()
#17 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[61] C:\Users\Admin\Desktop\Development\Minecraft\Practice\server\, string[69] C:\Users\Admin\Desktop\Development\Minecraft\Practice\server\plugins\)
#18 pmsrc/src/PocketMine(327): pocketmine\server()
#19 pmsrc(11): require(string[105] phar://C:/Users/Admin/Desktop/Development/Minecraft/Practice/server/PocketMine-M)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show