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

RealTime 2.1.1

Lock time

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I rewrote it today. Look at the new ways.
    Guillaume351 likes this.
  2. Guillaume351
    Offline

    Guillaume351 Active Member Plugin Developer

    Joined:
    Oct 11, 2013
    Posts:
    150
    Plugins:
    1
    Minecraft User:
    Guillaume351
    I'll look at that soon ;)
  3. TheOddgamer98
    Offline

    TheOddgamer98 New Member

    Joined:
    Apr 15, 2014
    Posts:
    30
    Minecraft User:
    TheOddgamer
    Hmmm.. This Plugin is okay but there are a few bad things...

    1.In older versions it was possible to Lock the current time where it was on the server
    2.In older versions it was possible to set the time to real-life time
    3. /rt sunset and /rt sunrise are not really right because it actually moves the sun but it's still full day :/
    Guillaume351 likes this.
  4. Guillaume351
    Offline

    Guillaume351 Active Member Plugin Developer

    Joined:
    Oct 11, 2013
    Posts:
    150
    Plugins:
    1
    Minecraft User:
    Guillaume351
    Yes I know the 2. and 3. problem, but are you sure it was possible to lock the current time ? I'll add it anyway when I will have time..
    TheOddgamer98 likes this.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Again, please check out StatsCore for how to use timezones. It is a bit complicated due to database things, but the main point is, I did it by:
    1. Get the IP of a player via $player->getAddress()
    2. Use json_decode(Utils::getURL("http://ipinfo.io/$ip/json")) to get the coords of a player (note that this is a thread-blocking long operation, so you must use an AsyncTask). It is just like a YAML data array
    3. Use the Google Tomezone API (you need the server owner to provide an API key) to find out the timezone (difference from UTC time in seconds). You can find more by searching.
    4. Store it so that you don't have to request this info every time, since Google Timezone API (free version) only let's you make a few thousands (I forgot how many) of requests a day. If you do this, you make the server faster as well as only need to request timezone for players who are newly registered with new IPs.
    LDX and 64FF00 like this.
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Edit: @sekjun9878 just opened a PR on PocketMine-MP. http://ip-api.com/json/$ip is faster.
    https://github.com/PocketMine/PocketMine-MP/pull/2151/files
    Guillaume351 likes this.
  7. TheOddgamer98
    Offline

    TheOddgamer98 New Member

    Joined:
    Apr 15, 2014
    Posts:
    30
    Minecraft User:
    TheOddgamer
    Alright ^^
  8. Guillaume351
    Offline

    Guillaume351 Active Member Plugin Developer

    Joined:
    Oct 11, 2013
    Posts:
    150
    Plugins:
    1
    Minecraft User:
    Guillaume351
    I just don't have a lot of time yet. I'm a beginner to code, I know nothing in database, so it's going to take time. I'll look at this on the next few nights..

    Edit : I changed the value for Sun set and Sun rise, I will add a lock time to current tick option, and then I will look at StatsCore
    Last edited: Oct 7, 2014
  9. Guillaume351
    Offline

    Guillaume351 Active Member Plugin Developer

    Joined:
    Oct 11, 2013
    Posts:
    150
    Plugins:
    1
    Minecraft User:
    Guillaume351
  10. Guillaume351
    Offline

    Guillaume351 Active Member Plugin Developer

    Joined:
    Oct 11, 2013
    Posts:
    150
    Plugins:
    1
    Minecraft User:
    Guillaume351
    Guillaume351 updated RealTime with a new update entry:

    New commands - Bug Fix !

    Read the rest of this update entry...
    Praxthisnovcht likes this.
  11. Praxthisnovcht
    Offline

    Praxthisnovcht Notable Member Plugin Developer

    Joined:
    Mar 10, 2014
    Posts:
    699
    Plugins:
    4
    Minecraft User:
    PraxHellTag
  12. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    Whaaaat?
    Praxthisnovcht likes this.
  13. Praxthisnovcht
    Offline

    Praxthisnovcht Notable Member Plugin Developer

    Joined:
    Mar 10, 2014
    Posts:
    699
    Plugins:
    4
    Minecraft User:
    PraxHellTag
    lsbg watching, I noticed that it snowed: D
    I did a similar thing that is soon ready
    Guillaume351 likes this.
  14. 64FF00
    Offline

    64FF00 Active Member Plugin Developer

    Joined:
    May 11, 2014
    Posts:
    297
    Plugins:
    2
    Minecraft User:
    64FF00
    Fixed broken commands and permissions in plugin.yml. (See below)
    ItzBroken.PNG
    Mat likes this.
  15. 64FF00
    Offline

    64FF00 Active Member Plugin Developer

    Joined:
    May 11, 2014
    Posts:
    297
    Plugins:
    2
    Minecraft User:
    64FF00

    Attached Files:

    Guillaume351 likes this.
  16. Guillaume351
    Offline

    Guillaume351 Active Member Plugin Developer

    Joined:
    Oct 11, 2013
    Posts:
    150
    Plugins:
    1
    Minecraft User:
    Guillaume351
    Thank you, I totally forgot to work on that. I will update the plugin with your file, thanks once again
    64FF00 likes this.
  17. 64FF00
    Offline

    64FF00 Active Member Plugin Developer

    Joined:
    May 11, 2014
    Posts:
    297
    Plugins:
    2
    Minecraft User:
    64FF00
    :D
  18. SempakBolong
    Offline

    SempakBolong New Member

    Joined:
    Mar 8, 2015
    Posts:
    6
    Minecraft User:
    SempakBolong
    Hey, how to change the hour? I already edited the config files and nothing happens. What is the value to change the config?
  19. Guillaume351
    Offline

    Guillaume351 Active Member Plugin Developer

    Joined:
    Oct 11, 2013
    Posts:
    150
    Plugins:
    1
    Minecraft User:
    Guillaume351
    In the config, there should be "Change Time : +0"
    Replace 0 with the number of hours to add
  20. Marcelo234
    Offline

    Marcelo234 New Member

    Joined:
    Oct 18, 2014
    Posts:
    204
    @Guillaume351
    please update this plugn to the PM 1.5
    thx
    that will be nice

Share This Page

Advertisement