Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Factions no work

Comments in 'Plugin Development' started by PolskiTHEPLAYER, Apr 25, 2016.

  1. PolskiTHEPLAYER
    Offline

    PolskiTHEPLAYER New Member

    Joined:
    Apr 1, 2015
    Posts:
    55
    Minecraft User:
    Flsmers
    PHP:
                       
                        
    if($args[0] == "create") {
                            if(
    $this->plugin->commands->get("/f create") == false) {
                                
    $sender->sendMessage($this->plugin->formatMessage("This command has been disabled, please ask\nan Admin if you think this is a mistake."));
                                return 
    true;
                 if(
    file_exists($this->getDataFolder()."Quest1/".$sender->getName().".txt")){
                
    $sender->sendMessage("§c • Ukończyłeś już zadanie • ");
            }else{
          if(
    $sender->getInventory()->contains(Item::get(103064))){
                
    $sender->getInventory()->addItem(Item::get(4064));
                   
    $sender->getInventory()->addItem(Item::get(4064));
                
    $sender->sendMessage("§a • Otrzymałeś za zadanie - 128 cobblestone'a • ");
                
    $file fopen($this->getDataFolder()."Quest1/".$sender->getName().".txt""w");
                
    fclose($file);
                }
                else{
                 
    $sender->sendMessage("§a • Zdobądź dla mnie 64 melony • ");
                 }
              }
             return 
    true;
                }
                            } else {
                                
    $factionName $args[1];
                                
    $f = new Faction($this->plugin$args[1], $sender->getPlayer()); //TODO: Split into two lines
                                
    $ses->updateFaction();
                                
    $sender->sendMessage($this->plugin->formatMessage("Faction successfully created!"true));
                                return 
    true;
                            }
                        }
                       
    What editi to buy factions?
    Sorry for my englisch :(
    eloszki013 likes this.
  2. AndrewBit
    Offline

    AndrewBit Notable Member

    Joined:
    Jun 18, 2015
    Posts:
    435
    Minecraft User:
    AndrewBit4
    Ok.
    Waiting to Intyre to lock this post.
  3. Muqsit
    Offline

    Muqsit Active Member

    Joined:
    Sep 9, 2015
    Posts:
    175
    Minecraft User:
    Muqsit
    WTaF? Elaborate your problem and whats with the Quests in FactionsPro?
    MinePocket Servers likes this.
  4. MinePocket Servers
    Offline

    MinePocket Servers Active Member

    Joined:
    Mar 6, 2014
    Posts:
    69
    Minecraft User:
    MinePocket
    Interesting, Im also working on factions and quests
    eloszki013 likes this.
  5. minebuilder0110
    Offline

    minebuilder0110 Notable Member

    Joined:
    Dec 8, 2014
    Posts:
    485
    Minecraft User:
    Apparitional
    Exact same thing before. Read an economy plugin API, apply it. If you can't, don't start with factions project.
    ...and stop putting questions into the code block.
    Last edited: Apr 26, 2016
    Primus likes this.

Share This Page

Advertisement