[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

    xupwup

    The solution is "dont use 12000", because if i were to solve this internally that would be exactly what i would do. There is no way to fix this any other way, due to latency.
     
  3. Offline

    wokka1

    Does this still work with b674 and 1.8.8 properTime? I've tried renaming this and Multiverse, and they still load in the same order, which is always propertime first.
     
  4. Offline

    xupwup

    Very strange, though they did change something about the way they load plugins. So, open properTime.jar with an archive manager, such as winrar, 7zip, or whatever. Open plugin.yml, and change "name: properTime" to "name: zproperTime". Then just save, and it should work.
     
  5. Offline

    wokka1

    xupwup, thanks for the replies, but that didn't work either, please see: http://pastebin.com/hXt1kcWi

    If I did something wrong, smack me and show me what I'm missing. It just refuses to load after Multiverse for some reason. Maybe Bukkit will eventually have something in it to do a loading order.
     
  6. Offline

    lsegal

    Every now and then this plugin dies with:

    19:31:52 [SEVERE] Exception in thread "Timer-16"
    19:31:52 [SEVERE] java.util.ConcurrentModificationException
    19:31:52 [SEVERE] at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
    19:31:52 [SEVERE] at java.util.AbstractList$Itr.next(AbstractList.java:343)
    19:31:52 [SEVERE] at org.bukkit.craftbukkit.CraftWorld.getPlayers(CraftWorld.java:524)
    19:31:52 [SEVERE] at org.bukkit.craftbukkit.CraftWorld.setFullTime(CraftWorld.java:423)
    19:31:52 [SEVERE] at org.bukkit.craftbukkit.CraftWorld.setTime(CraftWorld.java:412)
    19:31:52 [SEVERE] at nl.xupwup.properTime.properTime$FixTime$Step.run(properTime.java:247)
    19:31:52 [SEVERE] at java.util.TimerThread.mainLoop(Timer.java:512)
    19:31:52 [SEVERE] at java.util.TimerThread.run(Timer.java:462)


    I assume there isn't proper lock checking (or exception handling) in the time thread.

    Can you release the source code for this plugin?
     
  7. Offline

    Maxis010

    Please don't TLDR the original post before asking questions

    To Quote the OP
     
  8. Offline

    lsegal

    Why do you assume I TLDR'd the OP? That source is not up to date with the jar, unless the jar was updated since I downloaded it yesterday. Specifically, line 247 in properTime.jar does not have the call that caused the error.

    Perhaps I wasn't clear, can the new source be posted, or has the jar been recently updated? It's hard to know if/when either download changes.
     
  9. Offline

    xupwup

    For the next version I will package the source inside the jar. Also, the source is up to date, so please check if you have version 1.8.8.

    EDIT: Updated to 1.8.9, which moves the source inside the jar. You might want to update to that version for easier debugging.
     
  10. Offline

    lsegal

    Thanks for the update. I've fixed the ConcurrencyModificationException myself on the source, but I will upgrade to yours.
     
  11. Offline

    Montag

    Seems to be working great for CB699. Thanks!
     
  12. Offline

    RTRD

    CB 714, MC 1.5_02 "error":
    Code:
    2011-04-23 19:15:51 [WARNING] properTime: World 'world' not found
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] properTime: World 'world21' not found
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] properTime: World 'world23' not found
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    2011-04-23 19:15:51 [WARNING] Invalid config file, no world specified
    EDIT: Deleted the .conf file and restarted the server. Seems to work now.
     
  13. Offline

    tekac

    Could you possible integrate in this plugin faster smelt times? With 40+ players online the smelting tends to get slower and slower, thus taking forever. Thanks!
     
  14. Offline

    RTRD

    Tested and working on CB 714! :D

    But i get this warning:
    Code:
    2011-04-23 19:25:35 [WARNING] properTime: World 'world' not found
    2011-04-23 19:25:35 [WARNING] properTime: World 'survival' not found
    2011-04-23 19:25:35 [WARNING] properTime: World 'world21' not found
    2011-04-23 19:25:35 [WARNING] properTime: World 'world23' not found
     
  15. Offline

    xupwup

    No, sorry. That is not within the scope of this plugin. Also, if I were to build that in (I have no idea if that is possible), people want me to build something else in, ending with my plugin having to take over every timed event in the minecraft server. Your problem would only be really fixed if multicore support is added, so this is not the place to ask.
     
  16. Offline

    grizzlymann

    Not sure what I'm doing wrong. It seems to be ignoring my perma settings. The world folder names are: world, Nether and Creative. I've tried using caps and lowercase for the first letter but it doesn't seem to make a difference.

    Code:
    world: "world"
    timespeedDay: 0.5
    timespeedNight: 3.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: -1
    
    world: "nether"
    timespeedDay: 1.0
    timespeedNight: 1.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: 15000
    
    world: "creative"
    timespeedDay: 0.1
    timespeedNight: 3.0
    timespeedDusk: 3.0
    timespeedDawn: 1.0
    perma: 6000
    Edit: Capitalized the names and set all the values for Creative to 1.0 and it seems to be fixed. Thanks for the great plugin!
     
  17. Offline

    wolf_ma61

    It seems to ignore my settings. Running CB733 and have regular world "Cyberia" and nether world "Hell" using nether 1.2.
    Code:
    world: "Cyberia"
    timespeedDay: 0.25
    timespeedNight: 0.5
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: -1
    
    world: "Hell"
    timespeedDay: 1.0
    timespeedNight: 1.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: 15000
     
  18. Offline

    xupwup

    Enable debug mode, and post the results. Do this by adding
    Code:
    debug
    to your config file. For example:
    Code:
    debug
    world: "Cyberia"
    timespeedDay: 0.25
    timespeedNight: 0.5
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: -1
    
    world: "Hell"
    timespeedDay: 1.0
    timespeedNight: 1.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: 15000
     
  19. When does a new version for 733 comes?

    greetings
    Chriss
     
  20. Offline

    Maxis010

    1.8.9 is 733 compatible
     
    SirMustachio likes this.
  21. Offline

    Ross Gosling

    If i was to set Dawn,Day,Dusk and Night to 0.5 would it make the day,night cycle 40 minutes?
     
  22. Offline

    xupwup

    Yes.
     
  23. Offline

    Ross Gosling

    ok thanks
     
  24. Offline

    xupwup

    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 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.
     
  25. Offline

    pSy

    That are bad news. :/. Hope someone will continue your work. But thanks for your support till today.

    Is there a similar mod to this one? Since a few days i've the problem that propertime doesn't register all my worlds.
    I've 4 map, called new, normal, old, nether.
    normal and nehter are working fine, but new and old are not in the yml.file. When i add them manually, propertime still only works on normal and nether :/. Have no idea.
     
  26. Offline

    xupwup

    I will be updating this plugin so it remains functional until someone takes it over. I will not be creating feature updates, but I will continue creating bugfixes if needed.
    ProperTime needs to load after the plugin that loads your world, so probably your new worlds are loaded after properTime.
     
  27. Offline

    pSy

    ah ok thanks for your answer :)
    So is there a way to change the order of the loading plugins?
    I'm using Multiversere for the other worlds
     
  28. Offline

    Maxis010

    Rename the multiverse jar
    Just stick aaa on the start, this will cause Bukkit to find Multiverse before all your other plugins and load your worlds
     
  29. Offline

    Ideal-Hosting

    Does anyone know if it's working for 766?
     
  30. Offline

    xupwup

    Probably. There have been no breaking changes in the last few versions, so it will most likely work. Please report back if it works, so others do not have to ask the same question.
     
  31. Offline

    Maxis010

    Confirming 766 compatibility - No problems or changes required
     

Share This Page