Inactive [FIX/MECH] properTime v2.0 - Control the speed of time [1.0.1-R1]

Discussion in 'Inactive/Unsupported Plugins' started by andersonhc, Aug 9, 2011.

  1. Offline

    andersonhc

    properTime - Control the speed of time, for example to fix too long days/nights due to lag:
    Version: 2.0


    BukkitDev Project Page: http://dev.bukkit.org/server-mods/propertime/


    On many servers, lag causes the time to pass extremely slow, so xupwup created a fix.
    properTime runs in a dedicated thread, so it wont really be affected by lag.
    By default this plugin makes sure that the day/night cycle lasts exactly 20 minutes.
    If desired you can change this, so that it always runs at half speed, or -10 times as fast, causing the time to go backwards really fast :). Please note that this will cause the sun/moon to jerk, this can only be fixed with a client mod.
    This plugin is also compatible with other time changing plugins, however, I advise against using it in combination with time stopping plugins. It also works fine with beds.

    Sample config file:
    Code:
    propertime:
      world:
        timespeedday: 0.5
        timespeednight: 1.0
        timespeeddusk: 1.0
        timespeeddawn: 1.0
        perma: none
      world_nether:
        preset: alwaysnight
      world_the_end:
        followworld: world
        followworlddelay: 6000
    
    Valid values for perma are: none, night, day or numeric values between 0 and 24000.

    Valid presets are:
    ALWAYSDAY: permanent midday
    ALWAYSNIGHT: permanent midnight
    CYCLE24M: a full day/night cycle lasts 24 minutes, instead of 20min.
    CYCLE24H: a full day/night cycle lasts 24 hours

    Normally day lasts 10 minutes, dawn + dusk 1.5, and night 7.
    If you want your day to last 12 minutes, you should set timespeedDay to 10/12 = 0.833
    Also, when freezing time, if you set the time to somewhere during dusk or dawn, the light will flicker for the client. I advise against this.

    Features:
    • Configurable time speeds
    • Dedicated thread (so lag proof)
    • Separate configuration for day, night, dawn, dusk
    • Multiworld support (the plugin that creates the secondary worlds needs to load before properTime)
    • Permanent day/night
    • Ability to freeze time.
    • Keep time between different worlds sync'ed, with optional delay.
    To make sure that properTime loads after your multiworld plugin: (thanks to @tehbeard)


    Open properTime.jar with a program like winrar, and edit the plugin.yml file inside. Add the following code to it:
    Code:
    softdepend: [MultiVerse]
    In this example properTime will load after MultiVerse. Do this for any multiworld plugin you use. (note: you need the name of the multi world plugin as stated in it's own plugin.yml)

    Troubleshooting

    First of all, carefully read all errors, as well as the last few comments on this thread. If that does not fix your problem, try adding "debug" to the top of your config file. That way the plugin will give you a lot of information, some of which may be useful for finding out what is wrong.

    World "foo" not found
    Make sure your plugins load in the correct order. You can also try to remove or rename your config file, so that it is regenerated with the correct worldnames and syntax.

    Download on BukkitDev Project Page:
    http://dev.bukkit.org/server-mods/propertime/

    Changelog:

    Version 1.9.0
    • Added presets. Presets included are: ALWAYSDAY, ALWAYSNIGHT, CYCLE24H, CYCLE24M.
    • perma values may also be: none, day, night.
    • Added possibility to change default settings.
    Version 1.8.9


    • Sources are now inside the jar file. No other changes.
    Full Changelog:


    Show Spoiler

    Version 1.8.8
    • Open sourced!
    • Different synchronisation with the main thread, this should fix concurrentModificationException errors.
    Version 1.8.7


    • Use the bukkit scheduler to set the time from a thread. (should fix concurrentModificationException errors)
    Version 1.8.6


    • Added debugging functionality that can be enabled by putting the word "debug" somewhere in your config file, preferably at the top.
    Version 1.8.5


    • The parser now supports world names with spaces.
    • (A bit) nicer error messages.
    Version 1.8.4


    • Fixed stupid mistake where it said 2400 instead of 24000, causing a lot of weirdness when using the perma option.
    Version 1.8.3


    • Fixed a bug in the parser that caused nullpointer exceptions for some files.
    • Added the "perma" option for configuring permanent day/night.
    Version 1.8.2


    • Fixed bug that caused values below 1 to get rounded to 0, causing the time to stop for those that use a timespeed less than 1.
    Version 1.8.1


    • Fixed nullpointerexception when stopping the server when an invalid config file has been used.
    Version 1.8


    • Added multiworld support
    Version 1.7


    • Fixed compatibility with newer bukkit versions
    • The config file is now located at: plugins/properTime/properTime.conf
    Version 1.6


    • If the client would jump to for example dusk, the server will use the timespeed for dusk, so if you set your day speed to 0.25, and the dusk speed to 1, this will fix the flicker during the few seconds when the client wants to go to dusk, and the server still says day. This should not change anything if you use timespeeds >= 1.
    Version 1.5.1


    • Fixed namespace, see this.
    Version 1.5


    • Fixed compatibility with newer bukkit versions
    • You can now configure what world this plugin should work on. (only one is supported and this is not in the default config file)
    Version 1.4


    • Added the ability to configure timespeeds for dusk/dawn.
    Version 1.3


    • Fix compatibility with newer bukkit versions.
    Version 1.2


    • Added the ability to configure timespeeds for day/night independently.
    Version 1.1


    • Renamed properties file + location
    Version 1.0


    • Initial release
     
  2. Offline

    Piggy351

    Can you add an option to make all worlds day, rather than having to set all the worlds, just for the sake of time and it being easier? Also can you please add a reload command, I dislike having to use the /reload command and reloading the whole server? Thank you for continuing the plugin, I use it on all my servers.
     
  3. Offline

    Legolas75893

    Update needed or no? It's not working. Loads up fine. Nothing wrong with config.
     
  4. Offline

    Lextao

    Hello, this plugin is great but I can't get it to work...
    How do I set it to make a full Day-night cycle last 2 hours?
    I'm using #1550
     
  5. Offline

    andrewkm

    Working fine on latest dev CBs guys... using 1566 here.
     
  6. Offline

    Ogm

    Yep, it works fine on the latest CB, but the moon cycles through its phases every 5 seconds or so.
     
  7. Offline

    kalez

    Yeah. My members find it hilarious. But it does still work with 1597

    Edit: I recently noticed that this plugin also effects the bubbles for air underwater (they jerk back like the sun and moon), and i was wondering if anyone noticed it possibly effecting redstone tick or anything? Just curious
     
  8. Offline

    andersonhc

    I am setting up the project on BukkitDev, and a new version will be released soon. I'm taking a look are the jerks you're talking about.
     
    Don Redhorse likes this.
  9. Offline

    veN1337

  10. Offline

    andersonhc

    v2.0 on BukkitDev.

    + Ability to keep time on different worlds synchronized.

    No longer compatible with the old propertime.conf file. Check the auto generated config.yml.
     
  11. Offline

    Ogm

    Good to see an update! Everything looks good.

    Found one issue: World names in the config.yml file are case-sensitive, but when the plugin auto-generates the config file on first run, world names are created in all lowercase. As a result people whose world names contain capital letters will have to manually fix the world names in the config file before the plugin will start working correctly.
     
  12. Offline

    Lextao

    Help, I can't figure out how to make a Day last 1 hour and a Night last 1 hour... I've tried everything, help!
     
  13. Offline

    andersonhc

    @Ogm

    Thanks, fixing ASAP

    @Lextao

    Normal day lasts 10 minutes, to make it lasts 60 you should do 10/60 = 0,16666666, and night lasts 7 minutes, so 7/60 = 0,116666.

    Code:
    propertime:
      world:
        timespeedday: 0.166666
        timespeednight: 0.116666
        timespeeddusk: 1.0
        timespeeddawn: 1.0
        perma: none
    
     
  14. Offline

    cisco211

  15. Offline

    FatMiners

    please help i cant get my propertime plugin to load before multiverse ive followed all instructions and read every post and tried all your solutions.
    FatMiners
     
  16. Offline

    andersonhc

    @FatMiners

    Try changing softdepend to:

    Softdepend: [Multiverse-Core]
     
  17. Offline

    FatMiners

    i already have it, still doesn't load before multiverse. all that happens is multiverse loads then propertime loads. oh, and can you tell me how to copy and paste my console?
     
  18. Offline

    cisco211

    try [multiverse-core]
     
  19. Offline

    andersonhc

    But ProperTime needs to load AFTER multiverse.

    First, multiverse loads the worlds, and after propertime handle the time on these worlds.
     
  20. Offline

    FatMiners

    oh ok sorry for the hassle!

    in the config i typed:
    FlatLands:
    timespeedday: 1.0
    timespeednight: 1.0
    timespeeddusk: 1.0
    timespeeddawn: 1.0
    perma: day
    And the day will still turn to night and if i put:
    FlatLands:
    preset: ALWAYSDAY
    it still wont stay day, i have to manually change the time and then it will update and be the ALWAYSDAY preset time.
    sorry if this is my fault!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  21. Offline

    cisco211

    The plugin should be improved, because its possible to write the plugin without having this dependency issue :D

    For example, my plugin is doing almost the same, it does not load the worlds in a list, its iterating through the live world list itself on each update interval.
     
  22. Hey guys,

    (MV2 Dev here)
    I just made a similar post here about using soft depends and why it's not the best idea:

    Doing a softdepend probably isn't the best thing here, mainly because there are other world management plugins out there.

    My suggestion would be to monitor onWorldLoad() (http://jd.bukkit.org/doxygen/da/d7d...stener.html#a6fe1036dc781f63f1dcb48bb2ceb4657) this way, you don't have to depend on a single plugin (say MV). So when your plugin enables, iterate through the worlds that are loaded, adding your values, and also monitor that event, when new worlds are loaded (I think the default worlds may also call said method) you can respond accordingly.

    Cheers,
    --FF
     
    Don Redhorse likes this.
  23. Offline

    cisco211

    Another way:


    Code:
    private void setSchedulers() {
      PluginDescriptionFile pd = this.getDescription();
      getServer().getScheduler().cancelTasks(this);
      ...
      for (World world : getServer().getWorlds()) {
        ...
        TimeSyncTask syncer = new TimeSyncTask(...
        int state = getServer().getScheduler().scheduleSyncRepeatingTask(this,syncer,...
        if (state == -1) {
          serverConsole.severe("["+pd.getName() +"] Adding synchronous repeating task for 'syncer' failed!");
        }
    
      }
      ...
    }
    The TimeSyncTask class contains a method called: run() which updates the time. The Scheduler will call this method everytime then. setSchedulers() is used in the JavaPlugin class and will be used on all configuration changes, reloading the plugin/config and so on.
     
  24. Offline

    NickMiner69

    Hi all could some one let me know is this right for a 24 Hr day i like it to be real time on my server plesase, if this is not right could some one post the right way of doing this pleases Thank you .

    propertime:
    world:
    preset: cycle24h
    world_nether:
    preset: alwaysnight
    world_the_end:
    preset: alwaysnight
     
  25. Offline

    Azatha

    The only file available for download is the .jar... You've given a sample config file, but where do I put it? What do I call it? Do I only need the .jar, or am I expected to have other, older files from previous versions? This isn't very new-user friendly. :(
     
  26. Offline

    Krackalot

    To be fair, you probably shouldn't complain to the creator of this plugin for your lack of knowledge on how the process works, especially since tutorials are easy to find, even video ones. To answer your question, every plugin that I've ever used myself is only a .jar file, and goes in the plugin folder of your server root folder(the folder containing all, and only your server related files). When you run your server once, all .jars in the plugin folder which need configs, will generate(create) them on their own, shut down the server, edit configs, and start it back up. Very new user friendly....
     
  27. Offline

    Ohga

    The name of my world have a dot in it and this seems to throw ProperTime off. The logs show that ProperTime cuts off the dot and anything after when trying to find the world (but it do find the world when applying the default setting). This is the current content of config.yml:

    Code:
    propertime:
      "world-1.8":
        timespeedday: 0.333
        timespeednight: 0.466
        timespeeddusk: 0.2
        timespeeddawn: 0.2
        perma: none
    Do I need to apply some yml syntax trickery, or is this a bug?
     
  28. Offline

    Azatha

    I wasn't intending to be offensive or come off as complaining, just seeking help. But as a new user that has a server ran by Multiplay and not on my own machine, I have never actually seen that happen. Its always done it behind the scenes. The other mods I've downloaded manually also came with all the files. If I lack knowledge on how the process works, its because a lot of people never explain it and I've never been able to read that information. Still, thank you for now providing that information. That was all I really needed, and not the berating. :)
     
  29. Offline

    Ohga

  30. Offline

    Tulips

    does this work for 1.2.4?
     
  31. Offline

    andersonhc

    It does.
     

Share This Page