hey i need help. i am coding a Shop UI Plugin and now i have a big problem. My main file called Main.php and my shop file called Shop.php How can i connect these 2 files? In the Main file i had write the UI Basics (openShopForm) In the Shop File i had write the Shop form, but this form don't open. Thanks for help Good Day
You Mean Like When a Player Types The Shop Command? Shop.php PHP: public function Shop() {$api = $this->getServer()->getPluginManager()->getPlugin("FormAPI") //Getting The Plugin$form = $api->createSimpleForm(} And Now To Call It You Must Use The "Use" Statment Main.php PHP: <?phpNamespace AuthorName\PluginName;use pocketmine\Player;use pocketmine\plugin\PluginBase;use AuthorName\PluginName\Shop;//didn't include all use statments like Command Sender And Whatsoever cuz im too lazy.public function Main extends PluginBase { public function onCommand(CommandSender $sender, Command $cmd, string $label, array $args) {switch($cmd->getName()) { case "Test": // To Call it You Must Use "New " And The Class Name. Ex: new Shop($sender); break; return true;}return true;}return true;} Thats all.
Hey now I have a another question how can I add a new Item like a Super-Log with the Texture like a log u know ?
Could you elaborate ? Perhaps this points you in right direction: https://github.com/pmmp/PocketMine-MP/blob/stable/src/pocketmine/block/BlockFactory.php#L109