[INACTIVE][FIX/MECH] properTime v1.8.9 - Control the speed of time (+multiworld) [1000]

Discussion in 'Inactive/Unsupported Plugins' started by xupwup, Jan 29, 2011.

  1. Offline

    xupwup

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

    THIS PLUGIN HAS BEEN DISCONTINUED. See here for the continuation of this plugin.

    On many servers, lag causes the time to pass extremely slow, so I 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:
    # Use 2 for double speed, 3 for triple, etc.
    # At 1x speed, the complete day-night cycle takes 20 minutes.
    
    world: "nether"
    timespeedDay: 1.0 #these settings will be ignored because perma > 0
    timespeedNight: 1.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: 15000 # the time will always be 15000, which is at night. Use a value between 0 (sunrise) and 24000.
    
    world: "world"
    timespeedDay: 5.0
    timespeedNight: 5.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: -1 # less than 0, so will be ignored
    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.

    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)

    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.

    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.


    Download: http://www.xupwup.nl/data/games/minecraft/properTime.jar
    Source: Inside the jar.
    Please also vote on the poll here so I have a better idea about the popularity of my plugin.

    Changelog:
    Show Spoiler

    Version 1.8.9
    • Sources are now inside the jar file. No other changes.
    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



    I got bored with minecraft a while ago, and now I also got bored with maintaining my plugins. That means that there will be no more feature updates by me. If you want to take over this plugin, please send me a pm on this forum and I will answer your questions, put a link here to your version etc.
     
  2. Offline

    Ideal-Hosting

    Working with #766.
     
  3. Offline

    pSy

    Since i updated to CB803, the plugin doesn't work anymore. I only updated Essentials, could that be a problem?
     
  4. Offline

    xupwup

    Any errors?
     
  5. Doesn't seem to work for me either (or BigBrother and Backups :/).
    Might i have a problem with the time on server? I don't know what i'm talking about.
     
  6. Offline

    xupwup

    Try with debug on. Add the word "debug" (without the quotes) to the top of your config file, on its own line. This will cause it to print a message every few seconds, I would like (for example) 5 of those, and the messages generated during plugin load.
     
  7. Will test tonight once the server is quieter.
     
  8. Offline

    pSy

    Code:
    2011-05-25 14:39:36 [INFO] properTime reading from config at /games/ni6799_1/ftproot/minecraftbukkit/plugins/properTime/properTime.conf
    2011-05-25 14:39:36 [INFO] properTime debugging enabled
    2011-05-25 14:39:36 [INFO] World set to: new.
    2011-05-25 14:39:36 [INFO] World new, timespeedDay is now 0.2
    2011-05-25 14:39:36 [INFO] World new, timespeedNight is now 1.0
    2011-05-25 14:39:36 [INFO] World new, timespeedDusk is now 1.0
    2011-05-25 14:39:36 [INFO] World new, timespeedDawn is now 1.0
    2011-05-25 14:39:36 [INFO] World new, time is now fixed to -1
    2011-05-25 14:39:36 [WARNING] properTime: World 'normal' not found
    2011-05-25 14:39:36 [INFO] World new, timespeedDay is now 0.2
    2011-05-25 14:39:36 [INFO] World new, timespeedNight is now 1.0
    2011-05-25 14:39:36 [INFO] World new, timespeedDusk is now 1.0
    2011-05-25 14:39:36 [INFO] World new, timespeedDawn is now 1.0
    2011-05-25 14:39:36 [INFO] World new, time is now fixed to -1
    2011-05-25 14:39:36 [WARNING] properTime: World 'nether' not found
    2011-05-25 14:39:36 [INFO] World new, timespeedDay is now 1.0
    2011-05-25 14:39:36 [INFO] World new, timespeedNight is now 1.0
    2011-05-25 14:39:36 [INFO] World new, timespeedDusk is now 1.0
    2011-05-25 14:39:36 [INFO] World new, timespeedDawn is now 1.0
    2011-05-25 14:39:36 [INFO] World new, time is now fixed to -1
    2011-05-25 14:39:36 [INFO] properTime 1.8.9 initialized
    .
    .
    .
    .
    2011-05-25 14:39:46 [INFO] Synchronized time on world "new", diff was 0.
    2011-05-25 14:39:51 [INFO] Synchronized time on world "new", diff was 0.
    2011-05-25 14:39:56 [INFO] Synchronized time on world "new", diff was 0.
    2011-05-25 14:40:01 [INFO] Synchronized time on world "new", diff was 0.
    2011-05-25 14:40:06 [INFO] Synchronized time on world "new", diff was 0.
    2011-05-25 14:40:11 [INFO] Synchronized time on world "new", diff was 0.
    2011-05-25 14:40:16 [INFO] Synchronized time on world "new", diff was 0.
    2011-05-25 14:40:21 [INFO] Synchronized time on world "new", diff was 0.
    2011-05-25 14:40:26 [INFO] Synchronized time on world "new", diff was 0.
    2011-05-25 14:40:31 [INFO] Synchronized time on world "new", diff was 0.
    .....
    
    I know for my "nether" and "normal" World it can't work cause they are loaded after proper time, but for "new", my default world, it works fine up to the point i updated CB to 803.

    I think here is the problem
    2011-05-25 14:39:36 [INFO] World new, timespeedDay is now 0.2
    -> 2011-05-25 14:39:36 [INFO] World new, timespeedDay is now 1.0

    but why?
     
  9. Offline

    Maxis010

    Rename whatever is loading your worlds and stick aaa on the start so it loads first
    If it's multiverse it should already be loading before properTime but the triple a is still a good idea

    As for why, because it can't find the worlds it is taking those rules from the other worlds and applying them to your default in the order they are given
     
  10. Offline

    pSy

    ok, tried that, aaand it helped, so thanks a lot.

    I tried it with one a "amultiverse" an z to proper time, but it didn't worked. i didn't know that it is such a difference between one and three a.

    Thank you.
     
  11. Offline

    Simanova

    Addon seems to be broken on MC1.6 an CB812
     
  12. Offline

    xupwup

    Any errors? If not, please enable debug as described above, and post the results, also like described above.
     
  13. Offline

    aliqux

    Just to note, as I have seen other people with the same issue that I was running into. Propertime was not working after updating to 814. The update spawns a Nether world to your listing of world. Normally in the form of world_nether. The properTime.conf needs to account for that world or it will default the nether world as the settings you have for the normal world and the normal world will change to default Minecraft settings.
     
  14. Offline

    PsychoNecrosis

    xupwup, you might want to update your OP post to say 803, as it's working on that build.
     
  15. Offline

    xupwup

    K, thanks.

    Also, just to repeat:
    I got bored with minecraft a while ago, and now I also got bored with maintaining my plugins. That means that there will be no more feature updates by me. If you want to take over this plugin, please send me a pm on this forum and I will answer your questions, put a link here to your version etc.
     
  16. Offline

    Kruemelkatze

    Has somebody already tested if properTime works under 818?
     
  17. Offline

    Pr4w

  18. Offline

    Arcwolf

    @Pr4W I duno why its not working for you but it seems to be working exactly the same way as it always has for me. That is to say correctly and fully functional... <shrugs> This plugin seems to be working for 818.
     
  19. Offline

    Mycah

    So what you're saying is that if you add world: "world_nether" in your config, with the proper settings for all 4 phases, then everything for world: "world" the plugin should work again?
     
  20. Offline

    Kalais

    It's not working with default settings on CB 818.
     
  21. Offline

    Dominic_T

    If while trying to run properTime with 814 and up, you had errors that look like this:

    Code:
    [SEVERE] Could not load 'plugins\properTime.jar' in folder 'plugins':
    java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:59)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:194)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:117)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:103)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    then this (in the attachment) version of properTime I whipped up just now might fix it (it worked for me at least).

    Also, listen to Mycah, he's onto something with 'world_nether' in the config file. To get the settings to load for my server, I had to set identical properties for two worlds named 'world' and 'world_nether' in properties.conf (the actual name of my world on the server is just 'world' and the nether is currently disabled...).

    I'm using CB 818 by the way.
     

    Attached Files:

  22. Offline

    xupwup

    If you have trouble with your config file, delete it and have properTime regenerate it. That way you should have a working version. Also, if things appear to be failing, add the word "debug" without the quotes to the top of your config file, that way you can probably see what is wrong.
     
  23. Offline

    Dephurites

    Perhaps having the mod listen for worlds being loaded, then apply any of the settings to worlds that 'didn't exist'
     
  24. Offline

    xupwup

    That is a feature update.
     
  25. Offline

    ibuildparadise

    i use
    dawn 1.0
    dusk 1.0
    day .25
    night 2.0

    but the sun lags heavy and the moon jumps forward... can you fix that or say me how i can fix it?
     
  26. Offline

    Maxis010

    It would take a client mod to stop it being jumpy as the client is updating the sky on a scale of 1 and syncing with he server every few seconds which causes it to jump back
     
  27. Offline

    rtcabooservb

    Does propertime reduce lag on servers, if any is there from time? If so, how much of a performance impact does it take?
     
  28. Offline

    Maxis010

    properTime isn't designed to reduce lag, it's designed to stop a laggy server slowing down time, as well as allow for the duration of day, night, dawn and dusk to be altered, or even have time locked at a specific point
     
  29. Offline

    rtcabooservb

    Yes I know that, but has anyone ever experienced a laggy server due to time?
     
  30. I am not able to set up other world with this. It just says "World2 not found".

    My config:
    Code:
    # Use 2 for double speed, 3 for triple, etc.
    # At 1x speed, the complete day-night cycle takes 20 minutes.
    
    world: "World1"
    timespeedDay: 0.5
    timespeedNight: 1.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: -1
    
    world: "World2"
    timespeedDay: 0.5
    timespeedNight: 1.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: -1
     
  31. Offline

    Maxis010

    Ensure that your Multiworld plugin is loading before properTime and that is is loading your other worlds, I've found that Windows is easy as it goes alphabetical, Ubuntu Linux on the other hand, I don't have a dammed clue what that is doing as my plugins appear to load in random order that remains consistent across restarts
     

Share This Page