Tell me how to make it so that you can add a function to the config, get a nickname who opens MenuUI? PHP: public function MenuUIMain($sender){ $form = new SimpleForm(function (Player $sender, int $data = null){ $result = $data; if($result === null){ return true; } switch($result){ case 0: $this->menuText($sender, $this->getConfig()->get("menu.msg1")); <<getName break; } }); $form->setTitle($this->getConfig()->get("menu.title")); $form->addButton($this->getConfig()->get("menu.button1")); $form->sendToPlayer($sender); return $form; }
PHP: $player->getName();//get player name//i don't really know what do you mean (i suck at English haha), so if you want to set the config (ex: turn "dog" to "cat" in config), use$this->getConfig()->set("dog", "cat");
created a hundred topics, who will answer me, how to modify the PureChat or PurePerms plugin, so that when viewing the list of players tags would be displayed before nicknames?
Well you cannot just "Ok JusT TEll mE HoW To MakE DiS cUS i'm jusT laZy anD noT bOthEriNg tO lEarN hoW tO uSe tHesE apis and plugins". TRY to understand how the formapi works, read the guide for this channel, make a forum post and people might actually help