1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

case form getName ui

Discussion in 'Plugin Help' started by WylSmart, May 26, 2020.

  1. WylSmart

    WylSmart Slime

    Messages:
    93
    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 $senderint $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;
        }
     
  2. HiToLaKhanh

    HiToLaKhanh Spider Jockey

    Messages:
    25
    GitHub:
    HiToLaKhanh
    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");
     
  3. WylSmart

    WylSmart Slime

    Messages:
    93
    I want to get the "player name" in the config, sorry for my bad english
     
  4. WylSmart

    WylSmart Slime

    Messages:
    93
    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?
     
  5. Seeker

    Seeker Spider Jockey

    Messages:
    45
    GitHub:
    seeker-devs
    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
     
    Diduhless likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.