menu
#10302495 jojoe77777\FormAPI\FormAPI::sendFormMessage(): Argument #1 ($player) must be of type pocketmine\player\Player, pocketmine\console\ConsoleCommandSender given, called in c:\Users\Rene\PhpstormProjects\Plugins-API5\GrandTheft\src\SleepSpace9\GrandTheft\commands\CmdMechanic.php on line 243

Submitted by PocketMine-MP 5.9.0

General information

Version: 5.9.0
Git commit: 46307973
Plugin involvement: Direct
Report date: 2024-02-12 18:41:08 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 58 seconds

System Information

PHP version: 8.1.22
JIT status: Not available
Operating system: win
System banner: Windows NT IC17 10.0 build 22631 (Windows 11) AMD64

Error information

Warning: a plugin was directly involved in this crash. Please contact the plugin author.
Thread: Main
Message: jojoe77777\FormAPI\FormAPI::sendFormMessage(): Argument #1 ($player) must be of type pocketmine\player\Player, pocketmine\console\ConsoleCommandSender given, called in c:\Users\Rene\PhpstormProjects\Plugins-API5\GrandTheft\src\SleepSpace9\GrandTheft\commands\CmdMechanic.php on line 243
File: c:/Users/Rene/PhpstormProjects/Plugins-API5/FormAPI/src/jojoe77777/FormAPI/FormAPI
Line: #12
Type: TypeError
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
declare(strict_types = 1);

namespace jojoe77777\FormAPI;

use pocketmine\player\Player;
use pocketmine\plugin\PluginBase;

class FormAPI extends PluginBase{

public static function sendFormMessage(Player $player, string $title, string $text, string $button = "")
{
$form = new SimpleForm(function () {
return true;
});
$form->setTitle($title);
$form->setContent($text);
if(!empty($button)) $form->addButton($button);
$player->sendForm($form);
}

#0 c:/Users/Rene/PhpstormProjects/Plugins-API5/GrandTheft/src/SleepSpace9/GrandTheft/commands/CmdMechanic(243): jojoe77777\FormAPI\FormAPI::sendFormMessage(object pocketmine\console\ConsoleCommandSender#272460, string[11] ..lMechanic, string[46] Your vehicle is already sprayed in this color!)
#1 pmsrc/src/command/SimpleCommandMap(212): SleepSpace9\GrandTheft\commands\CmdMechanic->execute(object pocketmine\console\ConsoleCommandSender#272460, string[8] mechanic, array[0])
#2 pmsrc/src/Server(1426): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\console\ConsoleCommandSender#272460, string[48] mechanic "SleepSpace9" respray "dirtstriker" "3")
#3 c:/Users/Rene/PhpstormProjects/Plugins-API5/GrandTheft/src/SleepSpace9/GrandTheft/commands/CmdMechanic(290): pocketmine\Server->dispatchCommand(object pocketmine\console\ConsoleCommandSender#272460, string[48] mechanic "SleepSpace9" respray "dirtstriker" "3")
#4 c:/Users/Rene/PhpstormProjects/Plugins-API5/FormAPI/src/jojoe77777/FormAPI/Form(46): SleepSpace9\GrandTheft\commands\CmdMechanic->SleepSpace9\GrandTheft\commands\{closure}(object CustomPlayer\player\CustomPlayer#202665, int 3)
#5 pmsrc/src/player/Player(2139): jojoe77777\FormAPI\Form->handleResponse(object CustomPlayer\player\CustomPlayer#202665, int 3)
#6 pmsrc/src/network/mcpe/handler/InGamePacketHandler(973): pocketmine\player\Player->onFormSubmit(int 5, int 3)
#7 pmsrc/vendor/pocketmine/bedrock-protocol/src/ModalFormResponsePacket(63): pocketmine\network\mcpe\handler\InGamePacketHandler->handleModalFormResponse(object pocketmine\network\mcpe\protocol\ModalFormResponsePacket#365034)
#8 pmsrc/src/network/mcpe/NetworkSession(445): pocketmine\network\mcpe\protocol\ModalFormResponsePacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#156382)
#9 pmsrc/src/network/mcpe/NetworkSession(383): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\ModalFormResponsePacket#365034, string[7] e...3..)
#10 pmsrc/src/network/mcpe/raklib/RakLibInterface(219): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[10] cOeed2.b..)
#11 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[19] ...%y.v.....v*.(...)
#12 pmsrc/src/network/mcpe/raklib/RakLibInterface(111): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#202882)
#13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#14 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\snooze\SleeperHandler->processNotifications()
#15 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()
#16 pmsrc/src/Server(1691): pocketmine\snooze\SleeperHandler->sleepUntil(float 1707763268.4566)
#17 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#18 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[22] C:\Portable\pmmp-api5\, string[30] C:\Portable\pmmp-api5\plugins\)
#19 pmsrc/src/PocketMine(364): pocketmine\server()
#20 pmsrc(11): require(string[66] phar://C:/Portable/pmmp-api5/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show