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

Solved Always Day with Scheduler?

Comments in 'Plugin Development' started by cake23, Feb 9, 2016.

  1. cake23
    Offline

    cake23 Active Member

    Joined:
    Aug 10, 2015
    Posts:
    124
    Minecraft User:
    TheEnd
    How i can set the time always to day? Should i make this with a scheduler, and the scheduler sets the time every second to day? Can anyone help me?
    Thanks!
  2. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    https://forums.pocketmine.net/plugins/realtime.432/
    /rt lock day
    NOTE: you'll have to lock time for each world and make sure to run command /time set 0 before doing the /rt lock day
    cake23 likes this.
  3. cake23
    Offline

    cake23 Active Member

    Joined:
    Aug 10, 2015
    Posts:
    124
    Minecraft User:
    TheEnd
  4. Kvetinac97
    Offline

    Kvetinac97 Active Member Plugin Developer

    Joined:
    Nov 17, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    Kvetinac97
    PHP:
    $worldname "world";
    if (!
    $this->getServer()->isLevelLoaded($worldname)){
     
    $this->getServer()->loadLevel($worldname);
    }
    $level $this->getServer()->getLevelByName($worldname);
    $level->setTime(0);
    $level->stopTime();
    CrazedMiner and cake23 like this.
  5. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    You don't need a scheduler. Simply use $level->stopTime();
  6. cake23
    Offline

    cake23 Active Member

    Joined:
    Aug 10, 2015
    Posts:
    124
    Minecraft User:
    TheEnd
    Thanks!!

Share This Page

Advertisement