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

UHC Plugin Help

Discussion in 'Plugin Help' started by Daniel23, May 26, 2017.

  1. Daniel23

    Daniel23 Witch

    Messages:
    65
    GitHub:
    daniel23
    Having Problem with this one. Can someone refix this? this part: if($p->getInventory()->addItem();) {

    PHP:
    case "badlion":
    foreach(
    $this->getServer()->getOnlinePlayers() as $p){
    $p->setMaxHealth(20);
    $p->setHealth(20);
    $p->setFood(20);
    $p->setGamemode(0);
    $p->getInventory()->clearAll();

    if(
    $p->getInventory()->addItem();) {
                 switch(
    mt_rand(12)){
                      case 
    "1":
        
    $p->getInventory()->addItem(Item::get(27601));
    $p->getInventory()->addItem(Item::get(ITEM::GOLDEN_APPLE06));
    $p->getInventory()->addItem(Item::get(ITEM::GOLDEN_APPLE09));
    $p->getInventory()->addItem(Item::get(364064));
    $p->getInventory()->addItem(Item::get(27801));$p->getInventory()->addItem(Item::get(27901));
    $p->getInventory()->addItem(Item::get(1064));
    $p->getInventory()->addItem(Item::get(5064));

    $p->getInventory()->setHelmet(Item::get(31001));
    $p->getInventory()->setChestplate(Item::get(31101));
    $p->getInventory()->setLeggings(Item::get(31201));
    $p->getInventory()->setBoots(Item::get(31301));
    $p->getInventory()->sendArmorContents($p);
    break;
              case 
    "2":
        
    $p->getInventory()->addItem(Item::get(27601));
    $p->getInventory()->addItem(Item::get(ITEM::GOLDEN_APPLE04));
    $p->getInventory()->addItem(Item::get(ITEM::GOLDEN_APPLE09));
    $p->getInventory()->addItem(Item::get(364064));
    $p->getInventory()->addItem(Item::get(27801));$p->getInventory()->addItem(Item::get(27901));
    $p->getInventory()->addItem(Item::get(1064));
    $p->getInventory()->addItem(Item::get(5064));

    $p->getInventory()->setHelmet(Item::get(30601));
    $p->getInventory()->setChestplate(Item::get(31101));
    $p->getInventory()->setLeggings(Item::get(30801));
    $p->getInventory()->setBoots(Item::get(31301));
    $p->getInventory()->sendArmorContents($p);
    break;
    }
    }
    }
    $this->getServer()->broadcastMessage("§7[§cUHC§7-§3MEETUP§7] §7The §9MEETUP KIT§7-§3Badlion!");
    return 
    true;
    break;
     
  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.