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

How To lock sign with time ?

Comments in 'Plugin Development' started by TutoGamerWalid, Jan 13, 2016.

  1. Nawaf_Craft1b
    Offline

    Nawaf_Craft1b Active Member Plugin Developer

    Joined:
    May 8, 2015
    Posts:
    232
    Plugins:
    1
    Minecraft User:
    Nawaf_Craft1b
    If You Want To Look Time On Sign !
  2. TutoGamerWalid
    Offline

    TutoGamerWalid Active Member

    Joined:
    Jun 11, 2015
    Posts:
    69
    Minecraft User:
    TutoGamerWalid
    Ok thank
  3. TutoGamerWalid
    Offline

    TutoGamerWalid Active Member

    Joined:
    Jun 11, 2015
    Posts:
    69
    Minecraft User:
    TutoGamerWalid
    Ok thank .. :)
  4. TutoGamerWalid
    Offline

    TutoGamerWalid Active Member

    Joined:
    Jun 11, 2015
    Posts:
    69
    Minecraft User:
    TutoGamerWalid
    I Give file For help :(
    because its not working.

    I have no luck :(

    Attached Files:

  5. Nawaf_Craft1b
    Offline

    Nawaf_Craft1b Active Member Plugin Developer

    Joined:
    May 8, 2015
    Posts:
    232
    Plugins:
    1
    Minecraft User:
    Nawaf_Craft1b
    PHP:
        public function refreshSign() {
            foreach(
    $this->getServer()->getLevels() as $levels) {
                
    $tiles $this->getServer()->getLevelByName("world")->getTile(new Vector3(-94730));
                if(
    $tiles instanceof Sign) {
                    if ((
    $world $this->getServer()->getLevelByName("world"))) {
                        
    $count count($world->getPlayers());
                        
    $tiles->setText("§l§6[game]""§l§bJoin !""[$count/8]""world");
                    }
    if(
    $this->start count($this->players)> &  $this->min 20 $this->gameStarted === true) {
                        
    $event->setCancelled(true);// ?
                        
    $this->getServer()->broadcastMessage("§l§6[game] The Game is full !");
                    }
                }
            }
        }
    on Line 199
    You Have Some Problem in your Plugin
    And You Have Problem with
    PHP:
    public function GameFinish() {
            if (
    count($this->players) !== && $this->min $this->gameStarted === false) {
                
    $event->setCancelled(true);//?
                
    foreach($this->players as $player){
                if(isset(
    $this->players[$player->getName()])) {
         
    $this->getServer()->broadcastMessage("§l§6[Game] $player->getName() winner !");//Problem With Name And Some Problem
                    
    $player->teleport(Server::getInstance()->getLevelByName("world")->getSafeSpawn());
                        }
                        }
                    }
                      unset(
    $this->min);
                        unset(
    $this->players);
                        
    $this->refreshSign();
                    }
    And Some Problem
    Your style of programming bad iam sory about that
    Last edited: Jan 15, 2016
  6. TutoGamerWalid
    Offline

    TutoGamerWalid Active Member

    Joined:
    Jun 11, 2015
    Posts:
    69
    Minecraft User:
    TutoGamerWalid
    Lol my style xD I Love you Nawaf <3
  7. Nawaf_Craft1b
    Offline

    Nawaf_Craft1b Active Member Plugin Developer

    Joined:
    May 8, 2015
    Posts:
    232
    Plugins:
    1
    Minecraft User:
    Nawaf_Craft1b
    Me To :>
    TutoGamerWalid likes this.
  8. TutoGamerWalid
    Offline

    TutoGamerWalid Active Member

    Joined:
    Jun 11, 2015
    Posts:
    69
    Minecraft User:
    TutoGamerWalid
    Go MP for join Team Mcrafters

Share This Page

Advertisement