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

Solved Slider Enchantment

Discussion in 'Development' started by Loostac, May 17, 2020.

  1. Loostac

    Loostac Spider

    Messages:
    10
    what is wrong ? dont working
    PHP:
    public function kirilmazForm($player){
            
    $api $this->getServer()->getPluginManager()->getPlugin("FormAPI");
            
    $this->eco EconomyAPI::getInstance();
            
          
        
    $form $api->createCustomForm(function(Player $player,  array $data null){
            
    $result $data[0];
                            if(
    $result != null){
                                
    $kirilmazlik Enchantment::getEnchantment(17);
                             
    $kirilmazlik = new EnchantmentInstance($kirilmazlik$result);
                             
    $item $player->getPlayer()->getInventory()->getItemInHand();
                             
    $item->addEnchantment($kirilmazlik);
                            }

                        });

                        
    $form->setTitle("Büyü Menüsü");
                        
    $form->addSlider("Seviye" 141);
                        
    $form->sendToPlayer($player);
          }
     
  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.