jojoe77777 / formapi Goto Github PK
View Code? Open in Web Editor NEWSimple API for creating forms for MCPE clients (PocketMine only)
License: GNU Lesser General Public License v3.0
Simple API for creating forms for MCPE clients (PocketMine only)
License: GNU Lesser General Public License v3.0
Two, plugins, that both use FormAPI, clash with each other. So you get wrong UIs for each
Error:
Server thread/CRITICAL Unhandled exception executing command 'selectteam' in selectteam: Argument 2 passed to jojoe77777\FormAPI\SimpleForm::addButton() must be of the type integer, string given, called in /plugins/Core/src/Core/Main.php on line 423
27.06 14:27:12 [Server] Server thread/CRITICAL TypeError: "Argument 2 passed to jojoe77777\FormAPI\SimpleForm::addButton() must be of the type integer, string given, called in /plugins/Core/src/Core/Main.php on line 423" (EXCEPTION) in "FormAPI/src/jojoe77777/FormAPI/SimpleForm" at line 86
My code:
$form->addButton("RED". 1, "https://d1u5p3l4wpay3k.cloudfront.net/minecraft_gamepedia/thumb/7/70/Red_Wool.png/150px-Red_Wool.png?version=cedef5f2b12d3e9171914c8a9c9654e4");
Where is it wrong?Can you give an example of the connected interface for me?
Thanks!
$formapi = $this->getServer()->getPluginManager()->getPlugin("FormAPI");
$form = $formapi->createSimpleForm(function ($player,array $data = null){
if($data === null){
return;
}
switch($data[0]){
case 0:
$this->getServer()->getCommandMap()->dispatch($player, "tjoin");;
break;
case 1:
$this->tsetForm($player);
break;
case 2:
$this->getServer()->getCommandMap()->dispatch($player, "tquit");
}
});
$form->setTitle("§l§7Trad §bMenu");
$form->setContent("§o§a);
$form->addButton("§l§6);
$form->addButton("§l§6进入交易模式");
$form->addButton("§l§6设置交易价格");
$form->addButton("§l§6退出交易模式");
$form->sendToPlayer($player);
FormAPI_dev-7.phar
SlapperPlus_dev-3.phar
https://jenkins.pmmp.io/job/PocketMine-MP/1642/artifact/PocketMine-MP.phar
2018-11-14 [09:04:37] [Server thread/CRITICAL]: InvalidArgumentException: "Failed to encode form JSON: Malformed UTF-8 characters, possibly incorrectly encoded" (EXCEPTION) in "src/pocketmine/Player" at line 3373
2018-11-14 [09:04:37] [Server thread/DEBUG]: #0 FormAPI_dev-7.phar/src/jojoe77777/FormAPI/Form(31): pocketmine\Player->sendForm(jojoe77777\FormAPI\SimpleForm object)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #1 SlapperPlus_dev-3.phar/src/jojoe77777/SlapperPlus/commands/SlapperPlusCommand(55): jojoe77777\FormAPI\Form->sendToPlayer(pocketmine\Player object)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #2 FormAPI_dev-7.phar/src/jojoe77777/FormAPI/Form(46): jojoe77777\SlapperPlus\commands\SlapperPlusCommand->jojoe77777\SlapperPlus\commands\{closure}(pocketmine\Player object, integer 0)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #3 src/pocketmine/Player(3393): jojoe77777\FormAPI\Form->handleResponse(pocketmine\Player object, integer 0)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #4 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(246): pocketmine\Player->onFormSubmit(integer 0, integer 0)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #5 src/pocketmine/network/mcpe/protocol/ModalFormResponsePacket(49): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleModalFormResponse(pocketmine\network\mcpe\protocol\ModalFormResponsePacket object)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #6 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(96): pocketmine\network\mcpe\protocol\ModalFormResponsePacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #7 src/pocketmine/network/mcpe/protocol/BatchPacket(114): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\ModalFormResponsePacket object)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #8 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(96): pocketmine\network\mcpe\protocol\BatchPacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #9 src/pocketmine/Player(3060): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #10 src/pocketmine/network/mcpe/RakLibInterface(161): pocketmine\Player->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #11 vendor/pocketmine/raklib/src/server/ServerHandler(98): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string 90.XXX.XX.145 55757, raklib\protocol\EncapsulatedPacket object, integer 0)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #12 src/pocketmine/network/mcpe/RakLibInterface(102): raklib\server\ServerHandler->handlePacket()
2018-11-14 [09:04:37] [Server thread/DEBUG]: #13 src/pocketmine/network/Network(94): pocketmine\network\mcpe\RakLibInterface->process()
2018-11-14 [09:04:37] [Server thread/DEBUG]: #14 src/pocketmine/network/mcpe/RakLibInterface(92): pocketmine\network\Network->processInterface(pocketmine\network\mcpe\RakLibInterface object)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #15 vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe\{closure}()
2018-11-14 [09:04:37] [Server thread/DEBUG]: #16 vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
2018-11-14 [09:04:37] [Server thread/DEBUG]: #17 src/pocketmine/Server(2268): pocketmine\snooze\SleeperHandler->sleepUntil(double 1542182677.1073)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #18 src/pocketmine/Server(2135): pocketmine\Server->tickProcessor()
2018-11-14 [09:04:37] [Server thread/DEBUG]: #19 src/pocketmine/Server(1701): pocketmine\Server->start()
2018-11-14 [09:04:37] [Server thread/DEBUG]: #20 src/pocketmine/PocketMine(249): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/myserver/, string /home/myserver/plugins/)
2018-11-14 [09:04:37] [Server thread/DEBUG]: #21 /home/myserver/PocketMine-MP.phar(1): require(string phar:///home/myserver/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
2018-11-14 [09:04:37] [RakLibServer thread/NOTICE]: Blocked 90.XXX.XX.145 for 5 seconds
I uploaded many uis depending on formapi. Before 1.2.10 they were working perfect but on 1.2.10 the uis first step work but not the second
Where can I see how the api works?
Image at FormAPI take 30seconds+ to load plz help
$form->addButton("RED",1, "https://d1u5p3l4wpay3k.cloudfront.net/minecraft_gamepedia/thumb/7/70/Red_Wool.png/150px-Red_Wool.png?version=cedef5f2b12d3e9171914c8a9c9654e4");
When i create the UI and Click Any button, it doesnt do anything pls fix.
I don't know how xD
FormAPI_dev-5
SlapperPlus_dev-3.phar
PMMP Construction Stable #1544 (7 oct. 2018 18:33:13)
PHP 7.2.9
2018-10-08 [17:43:25] [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\server\DataPacketReceiveEvent' to 'FormAPI v1.2.0': Argument 1 passed to pocketmine\network\mcpe\NetworkBinaryStream::putString() must be of the type string, boolean given, called in phar:///home/myserver/PocketMine-MP.phar/src/pocketmine/network/mcpe/protocol/ModalFormRequestPacket.php on line 45 on jojoe77777\FormAPI\FormAPI
2018-10-08 [17:43:25] [Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\network\mcpe\NetworkBinaryStream::putString() must be of the type string, boolean given, called in phar:///home/myserver/PocketMine-MP.phar/src/pocketmine/network/mcpe/protocol/ModalFormRequestPacket.php on line 45" (EXCEPTION) in "src/pocketmine/network/mcpe/NetworkBinaryStream" at line 44
2018-10-08 [17:43:25] [Server thread/DEBUG]: #0 src/pocketmine/network/mcpe/protocol/ModalFormRequestPacket(45): pocketmine\network\mcpe\NetworkBinaryStream->putString(boolean )
2018-10-08 [17:43:25] [Server thread/DEBUG]: #1 src/pocketmine/network/mcpe/protocol/DataPacket(89): pocketmine\network\mcpe\protocol\ModalFormRequestPacket->encodePayload()
2018-10-08 [17:43:25] [Server thread/DEBUG]: #2 src/pocketmine/network/mcpe/RakLibInterface(226): pocketmine\network\mcpe\protocol\DataPacket->encode()
2018-10-08 [17:43:25] [Server thread/DEBUG]: #3 src/pocketmine/Player(3110): pocketmine\network\mcpe\RakLibInterface->putPacket(pocketmine\Player object, pocketmine\network\mcpe\protocol\ModalFormRequestPacket object, boolean , boolean )
2018-10-08 [17:43:25] [Server thread/DEBUG]: #4 src/pocketmine/Player(3130): pocketmine\Player->sendDataPacket(pocketmine\network\mcpe\protocol\ModalFormRequestPacket object, boolean , boolean )
2018-10-08 [17:43:25] [Server thread/DEBUG]: #5 FormAPI_dev-5.phar/src/jojoe77777/FormAPI/SimpleForm(50): pocketmine\Player->dataPacket(pocketmine\network\mcpe\protocol\ModalFormRequestPacket object)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #6 SlapperPlus_dev-3.phar/src/jojoe77777/SlapperPlus/commands/SlapperPlusCommand(55): jojoe77777\FormAPI\SimpleForm->sendToPlayer(pocketmine\Player object)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #7 FormAPI_dev-5.phar/src/jojoe77777/FormAPI/FormAPI(75): jojoe77777\SlapperPlus\commands\SlapperPlusCommand->jojoe77777\SlapperPlus\commands\{closure}(pocketmine\Player object, integer 0)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #8 src/pocketmine/plugin/MethodEventExecutor(38): jojoe77777\FormAPI\FormAPI->onPacketReceived(pocketmine\event\server\DataPacketReceiveEvent object)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #9 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(jojoe77777\FormAPI\FormAPI object, pocketmine\event\server\DataPacketReceiveEvent object)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #10 src/pocketmine/plugin/PluginManager(702): pocketmine\plugin\RegisteredListener->callEvent(pocketmine\event\server\DataPacketReceiveEvent object)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #11 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(91): pocketmine\plugin\PluginManager->callEvent(pocketmine\event\server\DataPacketReceiveEvent object)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #12 src/pocketmine/network/mcpe/protocol/BatchPacket(114): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\ModalFormResponsePacket object)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #13 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(92): pocketmine\network\mcpe\protocol\BatchPacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #14 src/pocketmine/Player(3056): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #15 src/pocketmine/network/mcpe/RakLibInterface(161): pocketmine\Player->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #16 vendor/pocketmine/raklib/src/server/ServerHandler(98): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string 109.30.100.6 53042, raklib\protocol\EncapsulatedPacket object, integer 0)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #17 src/pocketmine/network/mcpe/RakLibInterface(102): raklib\server\ServerHandler->handlePacket()
2018-10-08 [17:43:25] [Server thread/DEBUG]: #18 src/pocketmine/network/Network(94): pocketmine\network\mcpe\RakLibInterface->process()
2018-10-08 [17:43:25] [Server thread/DEBUG]: #19 src/pocketmine/network/mcpe/RakLibInterface(92): pocketmine\network\Network->processInterface(pocketmine\network\mcpe\RakLibInterface object)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #20 vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe\{closure}()
2018-10-08 [17:43:25] [Server thread/DEBUG]: #21 vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
2018-10-08 [17:43:25] [Server thread/DEBUG]: #22 src/pocketmine/Server(2259): pocketmine\snooze\SleeperHandler->sleepUntil(double 1539013405.5976)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #23 src/pocketmine/Server(2134): pocketmine\Server->tickProcessor()
2018-10-08 [17:43:25] [Server thread/DEBUG]: #24 src/pocketmine/Server(1700): pocketmine\Server->start()
2018-10-08 [17:43:25] [Server thread/DEBUG]: #25 src/pocketmine/PocketMine(249): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/myserver/, string /home/myserver/plugins/)
2018-10-08 [17:43:25] [Server thread/DEBUG]: #26 /home/myserver/PocketMine-MP.phar(1): require(string phar:///home/myserver/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
how to make formapi? anyone can make example formapi code?
sorry, im noob coding
and where are examples of using and integrating this constructor?
I have it installed to work with ReportGUI and t is not working. I tried to use it previously but its still not working.
I made a plugin and the form doesnt show up the plugin works but when i type the command nothing happens
does anyone know ho to add a description below a button
FormAPI_dev-5
SlapperPlus_dev-3.phar
PMMP Construction Stable #1544 (7 oct. 2018 18:33:13)
PHP 7.2.9
018-10-08 [17:43:34] [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\server\DataPacketReceiveEvent' to 'FormAPI v1.2.0': Dynamic field access on pocketmine\nbt\tag\CompoundTag is no longer supported on jojoe77777\FormAPI\FormAPI
2018-10-08 [17:43:34] [Server thread/CRITICAL]: RuntimeException: "Dynamic field access on pocketmine\nbt\tag\CompoundTag is no longer supported" (EXCEPTION) in "vendor/pocketmine/nbt/src/tag/NoDynamicFieldsTrait" at line 29
2018-10-08 [17:43:34] [Server thread/DEBUG]: #0 vendor/pocketmine/nbt/src/tag/NoDynamicFieldsTrait(37): pocketmine\nbt\tag\CompoundTag->throw()
2018-10-08 [17:43:34] [Server thread/DEBUG]: #1 SlapperPlus_dev-3.phar/src/jojoe77777/SlapperPlus/Main(62): pocketmine\nbt\tag\CompoundTag->__set(string Pos, pocketmine\nbt\tag\ListTag object)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #2 SlapperPlus_dev-3.phar/src/jojoe77777/SlapperPlus/commands/SlapperPlusCommand(76): jojoe77777\SlapperPlus\Main->makeSlapper(pocketmine\Player object, string Boat, string Antoine2lop)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #3 FormAPI_dev-5.phar/src/jojoe77777/FormAPI/FormAPI(75): jojoe77777\SlapperPlus\commands\SlapperPlusCommand->jojoe77777\SlapperPlus\commands\{closure}(pocketmine\Player object, array Array())
2018-10-08 [17:43:34] [Server thread/DEBUG]: #4 src/pocketmine/plugin/MethodEventExecutor(38): jojoe77777\FormAPI\FormAPI->onPacketReceived(pocketmine\event\server\DataPacketReceiveEvent object)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #5 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(jojoe77777\FormAPI\FormAPI object, pocketmine\event\server\DataPacketReceiveEvent object)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #6 src/pocketmine/plugin/PluginManager(702): pocketmine\plugin\RegisteredListener->callEvent(pocketmine\event\server\DataPacketReceiveEvent object)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #7 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(91): pocketmine\plugin\PluginManager->callEvent(pocketmine\event\server\DataPacketReceiveEvent object)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #8 src/pocketmine/network/mcpe/protocol/BatchPacket(114): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\ModalFormResponsePacket object)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #9 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(92): pocketmine\network\mcpe\protocol\BatchPacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #10 src/pocketmine/Player(3056): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #11 src/pocketmine/network/mcpe/RakLibInterface(161): pocketmine\Player->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #12 vendor/pocketmine/raklib/src/server/ServerHandler(98): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string 109.30.100.6 53042, raklib\protocol\EncapsulatedPacket object, integer 0)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #13 src/pocketmine/network/mcpe/RakLibInterface(102): raklib\server\ServerHandler->handlePacket()
2018-10-08 [17:43:34] [Server thread/DEBUG]: #14 src/pocketmine/network/Network(94): pocketmine\network\mcpe\RakLibInterface->process()
2018-10-08 [17:43:34] [Server thread/DEBUG]: #15 src/pocketmine/network/mcpe/RakLibInterface(92): pocketmine\network\Network->processInterface(pocketmine\network\mcpe\RakLibInterface object)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #16 vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe\{closure}()
2018-10-08 [17:43:34] [Server thread/DEBUG]: #17 vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
2018-10-08 [17:43:34] [Server thread/DEBUG]: #18 src/pocketmine/Server(2259): pocketmine\snooze\SleeperHandler->sleepUntil(double 1539013414.4976)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #19 src/pocketmine/Server(2134): pocketmine\Server->tickProcessor()
2018-10-08 [17:43:34] [Server thread/DEBUG]: #20 src/pocketmine/Server(1700): pocketmine\Server->start()
2018-10-08 [17:43:34] [Server thread/DEBUG]: #21 src/pocketmine/PocketMine(249): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/myserver/, string /home/myserver/plugins/)
2018-10-08 [17:43:34] [Server thread/DEBUG]: #22 /home/myserver/PocketMine-MP.phar(1): require(string phar:///home/myserver/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
How can I check if text in input was changed and what's the text after clicking Button?
I've tried this, but it don't work
` $api = $this->plugin->getServer()->getPluginManager()->getPlugin("FormAPI");
$form = $api->createCustomForm(function(Player $player, array $data){
$result = $data[0];
if($result["input"]["text"] == "Hi"){
$player->sendMessage("test");
}
});
$form->addInput("Test", "idk", "Type random message here");
$format->addButton("Sumbit");`
FormAPI does not check if the response data are valid, e.g. whether a slider response exceeds the slider range.
How to create a button in CustomForm?
I own seven servers and this plugin only works with 5 out of 7 servers, i dont know why maybe because its outdated. Please fix
I will send commit for the this issue, it should be
When I do a custom form, on the result interpretation, I use $data[0] value and it crash....
Someone explains to me how it is used, some example
Hi there, @jojoe77777!
Please create documentation for this as I have no clue what the API calls are, etc.
Hello. I think you should update your plugin. Since came out 3.0.0-ALPHA11. I can not use your plugin. It gives an error, for example, when working with the FormShop plug-in.
[11:01:21] [Server thread/CRITICAL]: Невозможно передать событие 'pocketmine\event\server\DataPacketReceiveEvent' в 'FormAPI v1.1': Argument 2 passed to ru\universalcrew\formshop\utils\Forms::ru\universalcrew\formshop\utils{closure}() must be of the type array, integer given, called in phar:///root/server/plugins/FormAPI-master.phar/src/jojoe77777/FormAPI/FormAPI.php on line 81 на jojoe77777\FormAPI\FormAPI
[11:01:21] [Server thread/CRITICAL]: TypeError: "Argument 2 passed to ru\universalcrew\formshop\utils\Forms::ru\universalcrew\formshop\utils{closure}() must be of the type array, integer given, called in phar:///root/server/plugins/FormAPI-master.phar/src/jojoe77777/FormAPI/FormAPI.php on line 81" (EXCEPTION) in "FormShop-master/src/ru/universalcrew/formshop/utils/Forms" at line 43
My Advanced kits plugin that requires FormApi to work the GUI does not work!
also
My temp-ban GUI plugin Has the same Issue the GUI Does nothing it opens but No buttons Work>
Could not pass event 'pocketmine\event\server\DataPacketReceiveEvent' to 'FormAPI v1.2.0': Argument 2 passed to ShopUI\Main::ShopUI{closure}() must be of the type array, null given, called in C:\Users\cw\Desktop\1.5.0\plugins\FormAPI-master\src\jojoe77777\FormAPI\FormAPI.php on line 75 on jojoe77777\FormAPI\FormAPI
23:12:11 CRITICAL > TypeError: "Argument 2 passed to ShopUI\Main::ShopUI{closure}() must be of the type array, null given, called in C:\Users\cw\Desktop\1.5.0\plugins\FormAPI-master\src\jojoe77777\FormAPI\FormAPI.php on line 75" (EXCEPTION) in "plugins/WolfGangShopUI-master/src/ShopUI/Main" at line 67
It is float not int according to other sources like Steadfast2.
when i had this plugin the GUI worked but ever scince the update to 1.5 MCPE the formAPI has not worked for my plugins? (Block Sniper , Advanced Kits) Help?
When I click a button of the form, it does nothing.
Server Software: PocketMine 3.13.0
public function OnlineUI($player){
$api = $this->getServer()->getPluginManager()->getPlugin("FormAPI");
$form = $api->createSimpleForm (function (Player $player, int $data = null) {
$result = $data;
if($result === null){
return true;
}
});
Bruh, Why??
please add branch for genapi :(
I have tried updating the API with PocketMine Tools and it didn't work so I was wondering if you guys would help
How do I install this?
hey bro can you add A wiki of how to use this plugin Thanks!
FormAPI_dev-5
TempBanUI_dev-54
PMMP Construction Stable #1544 (7 oct. 2018 18:33:13)
PHP 7.2.9
2018-10-08 [08:03:43] [Server thread/INFO]: SOSO77143 16[/8X.XXX.XXX.88:41336] logged out due to Kicked by admin. Reason: You are banned by MisterAsBeen for 29 day/s, 0 hour/s, 1 minute/s.
Reason: cheat
2018-10-08 [08:03:43] [Server thread/INFO]: SOSO77143 16 has been banned by MisterAsBeen for 29 day/s, 0 hour/s, 1 minute/s. Reason: cheat
2018-10-08 [08:03:43] [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\server\DataPacketReceiveEvent' to 'FormAPI v1.2.0': Object of class SQLite3Result could not be converted to int on jojoe77777\FormAPI\FormAPI
2018-10-08 [08:03:43] [Server thread/CRITICAL]: ErrorException: "Object of class SQLite3Result could not be converted to int" (EXCEPTION) in "TempBanUI_dev-54.phar/src/SonsaYT/TempBanUI/Main" at line 72
2018-10-08 [08:03:43] [Server thread/DEBUG]: #0 TempBanUI_dev-54.phar/src/SonsaYT/TempBanUI/Main(72): pocketmine\utils\Utils::errorExceptionHandler(integer 8, string Object of class SQLite3Result could not be converted to int, string phar:///home/myserver/plugins/TempBanUI_dev-54.phar/src/SonsaYT/TempBanUI/Main.php, integer 72, array Array())
2018-10-08 [08:03:43] [Server thread/DEBUG]: #1 FormAPI_dev-5.phar/src/jojoe77777/FormAPI/FormAPI(75): SonsaYT\TempBanUI\Main->SonsaYT\TempBanUI\{closure}(pocketmine\Player object, array Array())
2018-10-08 [08:03:43] [Server thread/DEBUG]: #2 src/pocketmine/plugin/MethodEventExecutor(38): jojoe77777\FormAPI\FormAPI->onPacketReceived(pocketmine\event\server\DataPacketReceiveEvent object)
2018-10-08 [08:03:43] [Server thread/DEBUG]: #3 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(jojoe77777\FormAPI\FormAPI object, pocketmine\event\server\DataPacketReceiveEvent object)
2018-10-08 [08:03:43] [Server thread/DEBUG]: #4 src/pocketmine/plugin/PluginManager(702): pocketmine\plugin\RegisteredListener->callEvent(pocketmine\event\server\DataPacketReceiveEvent object)
2018-10-08 [08:03:43] [Server thread/DEBUG]: #5 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(91): pocketmine\plugin\PluginManager->callEvent(pocketmine\event\server\DataPacketReceiveEvent object)
2018-10-08 [08:03:43] [Server thread/DEBUG]: #6 src/pocketmine/network/mcpe/protocol/BatchPacket(114): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\ModalFormResponsePacket object)
2018-10-08 [08:03:43] [Server thread/DEBUG]: #7 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(92): pocketmine\network\mcpe\protocol\BatchPacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object)
2018-10-08 [08:03:43] [Server thread/DEBUG]: #8 src/pocketmine/Player(3056): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
2018-10-08 [08:03:43] [Server thread/DEBUG]: #9 src/pocketmine/network/mcpe/RakLibInterface(161): pocketmine\Player->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
2018-10-08 [08:03:43] [Server thread/DEBUG]: #10 vendor/pocketmine/raklib/src/server/ServerHandler(98): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string 80.214.16.146 26833, raklib\protocol\EncapsulatedPacket object, integer 0)
2018-10-08 [08:03:43] [Server thread/DEBUG]: #11 src/pocketmine/network/mcpe/RakLibInterface(102): raklib\server\ServerHandler->handlePacket()
2018-10-08 [08:03:43] [Server thread/DEBUG]: #12 src/pocketmine/network/Network(94): pocketmine\network\mcpe\RakLibInterface->process()
2018-10-08 [08:03:43] [Server thread/DEBUG]: #13 src/pocketmine/network/mcpe/RakLibInterface(92): pocketmine\network\Network->processInterface(pocketmine\network\mcpe\RakLibInterface object)
2018-10-08 [08:03:43] [Server thread/DEBUG]: #14 vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe\{closure}()
2018-10-08 [08:03:43] [Server thread/DEBUG]: #15 vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
2018-10-08 [08:03:43] [Server thread/DEBUG]: #16 src/pocketmine/Server(2259): pocketmine\snooze\SleeperHandler->sleepUntil(double 1538978623.8429)
2018-10-08 [08:03:43] [Server thread/DEBUG]: #17 src/pocketmine/Server(2134): pocketmine\Server->tickProcessor()
2018-10-08 [08:03:43] [Server thread/DEBUG]: #18 src/pocketmine/Server(1700): pocketmine\Server->start()
2018-10-08 [08:03:43] [Server thread/DEBUG]: #19 src/pocketmine/PocketMine(249): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/myserver/, string /home/myserver/plugins/)
2018-10-08 [08:03:43] [Server thread/DEBUG]: #20 /home/myserver/PocketMine-MP.phar(1): require(string phar:///home/myserver/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
hey how do you add a slider
Whenever I try to send a form when a button in another form is clicked, it does nothing but close the current form. No errors in console either. Is this because of the latest update? If so, how do I send a form once another form button is clicked?
latest FormAPI build is not compatible with latest PMMP stable build
thanks
2018-09-11 [15:01:02] [Server thread/ERROR]: Could not load plugin 'FormAPI': Incompatible API version (plugin requires one of: 3.2.0)
2018-09-11 [15:01:02] [Server thread/CRITICAL]: Could not load plugin 'TempBanUI': Unknown dependency: FormAPI
FormAPI_dev-7
https://poggit.pmmp.io/r/41258/FormAPI_dev-7.phar
KO with :
PocketMine-MP #1433
https://jenkins.pmmp.io/job/PocketMine-MP/1433/
OK with 👍
PocketMine-MP #1421
https://jenkins.pmmp.io/job/PocketMine-MP/1421/
Honestly, I even somehow amused to ask such a stupid question, well, all the same. It is very interesting to me, where did the developer learn about, for example, types of forms, how did the developer learn about the data format, how?
I use 813
13:04:55] [Server thread/CRITICAL]: Невозможно передать событие 'pocketmine\event\server\DataPacketReceiveEvent' в 'FormAPI v1.1': Dynamic field access on pocketmine\nbt\tag\CompoundTag is no longer supported на jojoe77777\FormAPI\FormAPI
[13:04:55] [Server thread/CRITICAL]: RuntimeException: "Dynamic field access on pocketmine\nbt\tag\CompoundTag is no longer supported" (EXCEPTION) in "vendor/pocketmine/pocketmine-nbt/src/tag/NoDynamicFieldsTrait" at line 29 [13:04:55] [Server thread/DEBUG]: #0 vendor/pocketmine/pocketmine-nbt/src/tag/NoDynamicFieldsTrait(37): pocketmine\nbt\tag\CompoundTag->throw() [13:04:55] [Server thread/DEBUG]: #1 SlapperPlus/src/jojoe77777/SlapperPlus/Main(62): pocketmine\nbt\tag\CompoundTag->__set(string Pos, pocketmine\nbt\tag\ListTag object)
[13:04:55] [Server thread/DEBUG]: #2 SlapperPlus/src/jojoe77777/SlapperPlus/commands/SlapperPlusCommand(76): jojoe77777\SlapperPlus\Main->makeSlapper(pocketmine\Player object, string Human, string Daniil129932)
[13:04:55] [Server thread/DEBUG]: #3 FormAPI-master.phar/src/jojoe77777/FormAPI/FormAPI(75): jojoe77777\SlapperPlus\commands\SlapperPlusCommand->jojoe77777\SlapperPlus\commands{closure}(pocketmine\Player object, array Array())
[13:04:55] [Server thread/DEBUG]: #4 src/pocketmine/plugin/MethodEventExecutor(38): jojoe77777\FormAPI\FormAPI->onPacketReceived(pocketmine\event\server\DataPacketReceiveEvent object)
[13:04:55] [Server thread/DEBUG]: #5 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(jojoe77777\FormAPI\FormAPI object, pocketmine\event\server\DataPacketReceiveEvent object)
[13:04:55] [Server thread/DEBUG]: #6 src/pocketmine/plugin/PluginManager(687): pocketmine\plugin\RegisteredListener->callEvent(pocketmine\event\server\DataPacketReceiveEvent object)
[13:04:55] [Server thread/DEBUG]: #7 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(91): pocketmine\plugin\PluginManager->callEvent(pocketmine\event\server\DataPacketReceiveEvent object)
[13:04:55] [Server thread/DEBUG]: #8 src/pocketmine/network/mcpe/protocol/BatchPacket(114): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\ModalFormResponsePacket object)
[13:04:55] [Server thread/DEBUG]: #9 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(92): pocketmine\network\mcpe\protocol\BatchPacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object)
[13:04:55] [Server thread/DEBUG]: #10 src/pocketmine/Player(3016): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object) [13:04:55] [Server thread/DEBUG]: #11 src/pocketmine/network/mcpe/RakLibInterface(147): pocketmine\Player->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
[13:04:55] [Server thread/DEBUG]: #12 vendor/pocketmine/raklib/server/ServerHandler(98): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string 188.170.196.103 9386, raklib\protocol\EncapsulatedPacket object, integer 0) [13:04:55] [Server thread/DEBUG]: #13 src/pocketmine/network/mcpe/RakLibInterface(88): raklib\server\ServerHandler->handlePacket() [13:04:55] [Server thread/DEBUG]: #14 src/pocketmine/network/Network(89): pocketmine\network\mcpe\RakLibInterface->process() [13:04:55] [Server thread/DEBUG]: #15 src/pocketmine/Server(2491): pocketmine\network\Network->processInterfaces() [13:04:55] [Server thread/DEBUG]: #16 src/pocketmine/Server(2240): pocketmine\Server->tick() [13:04:55] [Server thread/DEBUG]: #17 src/pocketmine/Server(2116): pocketmine\Server->tickProcessor() [13:04:55] [Server thread/DEBUG]: #18 src/pocketmine/Server(1702): pocketmine\Server->start()
[13:04:55] [Server thread/DEBUG]: #19 src/pocketmine/PocketMine(305): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /root/zertix/, string /root/zertix/plugins/)
[13:04:55] [Server thread/DEBUG]: #20 /root/zertix/PocketMine-MP.phar(1): require(string phar:///root/zertix/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
Images doesnt work anymore on last PM update
please fix
Hello the pro guys!
Can you help me, how can I use this plugin?
Okay, I did some research and found some bugs which are happening because of 1.2.5.
with my plugin im trying to make it send a message the player when they press a button in a modal form. I have
$form = $this->getServer()->getPluginManager()->getPlugin("FormAPI")->createModalForm(function(Player $sender, array $data) {
switch($data[0]) {
case 0:
break;
case 1:
$sender->sendMessage(C::GREEN . "You can apply for staff at
link");
break;
}
});
$form->setTitle(C::BOLD . C::WHITE . "EruptusPE Staff");
$form->setContent("text");
$form->setButton1("Back");
$form->setButton2("Apply");
$form->sendToPlayer($sender);
it sends the form but when i press the apply button it doesn't do anything. Can someone help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.