1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

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

Solved Check for specific minecraft world time?

Discussion in 'Skript' started by khelpire, Feb 24, 2021.

Thread Status:
Not open for further replies.
  1. khelpire

    khelpire Member

    Joined:
    Feb 22, 2021
    Messages:
    4
    Likes Received:
    1
    Hello I am planning to reset the resource world on my server using skript and I want the resource world to have the same time as all my other worlds or let's say specific world, but I don't know what is the correct code for check_time?

    Here is my code so far

    every 72000 ticks:
    make console execute "resourceworld reset"
    make console execute "time set {spawn_world_time} resourceworld"

    and also if possible, for all the other worlds that I have like the wilderness world I want them to have the same time with our spawn.
    --- Double Post Merged, Feb 26, 2021, Original Post Date: Feb 24, 2021 ---
    Hello can anyone help me find the code for check time in docs? I mean I am really new to skript or to coding so what category does check_specific_world_time belongs? Events, Conditions, etc...
    --- Double Post Merged, Feb 26, 2021 ---
    Update:
    Okay I just found it on Documenations, the placeholder is %time% may I ask on how to make a variable that connects with %time%?
    like variable time = %time%
     
  2. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    If you want to set the same time to all worlds do this:
    Code (Skript):
    1. command /timeworlds:
    2.     permission: timeworlds.admin
    3.     trigger:
    4.         loop all worlds:
    5.             set loop-world's time to 6:00 #Day
    If you want to check the worlds time use this:
    Code (Skript):
    1. if world's time is %time%:

    For example
    Code (Skript):
    1. command /checktime:
    2.     trigger:
    3.         if world's time is between 6:00 and 19:29:
    4.             send "&aWorld's time is day!"
    5.         else:
    6.             send "&aWorld's time is night!"
    Also, "world's time" will show you the world's time of the player that ran that command.
     
    • Informative Informative x 1
  3. khelpire

    khelpire Member

    Joined:
    Feb 22, 2021
    Messages:
    4
    Likes Received:
    1
    Hello, thank you so much for this! I have read the code and I just realize to myself that I kept on using the console command and not on skript events or such. Thank you! I have learned new codes or knowledge from skript. Will be checking more about skript in the Docs. Btw, this is the event or command that I really want to have on my server to let all worlds have the same time.
     
    • Like Like x 1
  4. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    You're welcome.
     
    • Friendly Friendly x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...