Inactive [MECH] TimeFold - Fold the time to your needs!

Discussion in 'Inactive/Unsupported Plugins' started by SilverstarX, May 11, 2011.

  1. Offline

    SilverstarX

    TimeFold
    New maintaner! This project is now managed by @!Phoenix! and you will find all news and updates on the projects devbukkit page!


    Do you think a day needs to have 48 hours for all your work to do?
    You don't want to be interrupted by fading out light and torches don't do the job?
    But you also want to go on monster hunting in the night?
    TimeFold lets you fold the time the way you want!



    Everything below here is partly or completely outdated, so please visit the projects devbukkit page to be up to date, I'll just leave it here for documentary purposes.

    Features:
    • Extend/lower the day and/or night to an amount of your choice, even 0
    • Multiworld support
    • Does not break redstone circuits or plant growing
    • CraftBukkitUpToDate support
    Planned Features:
    • Change the settings on the fly ingame
    • Possibility to set the day/night to an amout <1, e.g. 0.25
    • Check for using beds -in progress
    • Announcements on dawn/dusk/timefold -in progress
    • Dawn/dusk every x days
    • Voting
    Issues:
    • May be incompatible with Multiverse 2
    Function / How it works:
    The plugin cycles through the set amount of days and after that, through the nights.
    For the days, right before dusk, it will set the time back* to morning right after dawn, as long as all set days are gone, and then the same for the nights
    For example, if you set it to <worldname>:3:2 it will look like this:
    Day 1
    Day 2
    Day 3
    (Dusk)
    Night 1
    Night 2
    (Dawn)
    and then again from the beginning.
    *It does not really sets the time back into the past (that would break redstone and growing etc) but instead, it skips the night.

    Configuration:
    Way A) Start the server once to let TimeFold create the settings file itself.
    Way B) Use the file provided in the ZIP-download.
    Way C) Create the directory and file yourself at plugins/TimeFold/TimeFold.settings
    Stop the server (or do a /reload later), customize the file to your needs. One line for every world like this:
    Code:
    world:10:1
    <worldname>:<days>:<nights>
    Worldnames are case insensitive.
    If you don't specify a world in the file, its day/night cycle will be untouched and run like normal.

    Commands:
    • /timefold - shows you the current day/night in the cycle
    • /timefold report - creates a textfile in the plugins/TimeFold/ directory with some information which may be helpful for me helping you
    • timefold <world> (server console) - same as /timefold
    Download:
    ***outdated! See the devbukkit page for current versions and downloads!***
    Static JAR
    v0.5.beta1 1060: ZIP
    v0.4.2 953: JAR | ZIP
    v0.4 766: JAR | ZIP
    v0.3 740: JAR | ZIP
    Source: GitHub
    [​IMG]
    All downloads are also available at github.

    Changelog:
    v0.4.2 02.07.11 b754/cb953
    • Added /timefold report command
    • Fixed TimeFold calling from server console
    • Fixed something which could cause an OutOfMemoryError
    • general code reworking
    v0.4 19.05.11 b681/cb766
    • Fixed: creating settings file on startup
    • Fixed: crash on non-existent world
    • reworked ActionListener, now allows 0 as a value for day or night
    • general code cleanup
    older changes (open)

    v0.3 12.05.11 b669/cb740
    • initial public release
    • removed debug code
    v0.2b
    • reworked FileHandler and ActionListener using HashMaps instead of Arrays
    v0.2a
    • first git versioned version

    Inspired by the discontinued Extendday I wrote this for my server because we did not want to have day OR night as the other plugins do. And made it public because I wanted to give something back to this great community!
    As this is my first bukkit plugin and my first project in java since a while (over a year) and I'm not a native english speaker (I'm german), please, be clement, thank you :)
     
    zipron and Mitsugaru like this.
  2. Offline

    SilverstarX

    @Scandragon
    I have added some report function my current dev build, I'll put a copy up here today.

    @levifig
    Are you calling the timefold command from the server console? That doesn't work in the v0.4, try the above here attached 0.4.1 I believe I fixed it there already.

    @wassilij
    v0.4.1? Great.
     
    wassilij likes this.
  3. Offline

    baem

    doesnt work anymore with 953
     
  4. Offline

    SilverstarX

    @baem
    Well, try current v0.4.2 which is built for cb#953

    If still does not work, please provider further information: what does not work, error messages (ingame and/or console), a copy of your config file, and the report file (since 0.4.2; see Commands in the OP).
     
  5. Offline

    unl33t

    I've been getting the below error for a while and I finally stepped through each of the plugins I have installed and found that TimeFold was the one throwing it. I'm running a headless MC server via McMyAdmin so I'm not sure why it's trying to connect to a display. Any ideas?
    Code:
    2011-07-08 09:54:42 [SEVERE] Exception in thread "TimerQueue"
    2011-07-08 09:54:42 [SEVERE] java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.
    2011-07-08 09:54:42 [SEVERE]    at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    2011-07-08 09:54:42 [SEVERE]    at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52)
    2011-07-08 09:54:42 [SEVERE]    at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155)
    2011-07-08 09:54:42 [SEVERE]    at java.security.AccessController.doPrivileged(Native Method)
    2011-07-08 09:54:42 [SEVERE]    at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:131)
    2011-07-08 09:54:42 [SEVERE]    at java.lang.Class.forName0(Native Method)
    2011-07-08 09:54:42 [SEVERE]    at java.lang.Class.forName(Class.java:169)
    2011-07-08 09:54:42 [SEVERE]    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
    2011-07-08 09:54:42 [SEVERE]    at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:89)
    2011-07-08 09:54:42 [SEVERE]    at java.lang.Class.forName0(Native Method)
    2011-07-08 09:54:42 [SEVERE]    at java.lang.Class.forName(Class.java:169)
    2011-07-08 09:54:42 [SEVERE]    at java.awt.Toolkit$2.run(Toolkit.java:834)
    2011-07-08 09:54:42 [SEVERE]    at java.security.AccessController.doPrivileged(Native Method)
    2011-07-08 09:54:42 [SEVERE]    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:826)
    2011-07-08 09:54:42 [SEVERE]    at java.awt.Toolkit.getEventQueue(Toolkit.java:1689)
    2011-07-08 09:54:42 [SEVERE]    at java.awt.EventQueue.invokeLater(EventQueue.java:999)
    2011-07-08 09:54:42 [SEVERE]    at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1267)
    2011-07-08 09:54:42 [SEVERE]    at javax.swing.Timer$1.run(Timer.java:583)
    2011-07-08 09:54:42 [SEVERE]    at javax.swing.Timer$1.run(Timer.java:581)
    2011-07-08 09:54:42 [SEVERE]    at java.security.AccessController.doPrivileged(Native Method)
    2011-07-08 09:54:42 [SEVERE]    at javax.swing.Timer.post(Timer.java:581)
    2011-07-08 09:54:42 [SEVERE]    at javax.swing.TimerQueue.postExpiredTimers(TimerQueue.java:194)
    2011-07-08 09:54:42 [SEVERE]    at javax.swing.TimerQueue.run(TimerQueue.java:230)
    2011-07-08 09:54:42 [SEVERE]    at java.lang.Thread.run(Thread.java:662)
    
    2011-07-08 09:59:41 [INFO] [TimeFold] Status: Enabled
    2011-07-08 09:59:41 [INFO] Version: 0.4.2
    2011-07-08 09:59:41 [INFO] Author(s): Silverstar
    2011-07-08 09:59:41 [INFO] Description: A time modifying plugin
    2011-07-08 10:00:42 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-904-g9277096-b953jnks (MC: 1.7.2)
    
    Config
     
  6. Offline

    SilverstarX

    @unl33t
    Hm. Funny. I don't know why its trying to reach a display. I don't do anything related.
    I'm running my server headless, too, and never encountered that error. But I'm not using McMyAdmin, so I don't know of any possible side-effects.
    I'll see what I can do.
     
  7. Offline

    wassilij

    Bukkit 1000

    Code:
    2011-07-18 15:53:45 [SEVERE] Exception in thread "AWT-EventQueue-0"
    2011-07-18 15:53:45 [SEVERE] java.util.ConcurrentModificationException
    2011-07-18 15:53:45 [SEVERE]     at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.util.ArrayList$Itr.next(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at org.bukkit.craftbukkit.CraftWorld.getPlayers(CraftWorld.java:551)
    2011-07-18 15:53:45 [SEVERE]     at org.bukkit.craftbukkit.CraftWorld.setFullTime(CraftWorld.java:405)
    2011-07-18 15:53:45 [SEVERE]     at org.bukkit.craftbukkit.CraftWorld.setTime(CraftWorld.java:394)
    2011-07-18 15:53:45 [SEVERE]     at me.silverstar.timefold.TimeFoldActionListener.actionPerformed(TimeFoldActionListener.java:71)
    2011-07-18 15:53:45 [SEVERE]     at javax.swing.Timer.fireActionPerformed(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at javax.swing.Timer$DoPostEvent.run(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.awt.EventQueue.access$000(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.awt.EventQueue$3.run(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.awt.EventQueue$3.run(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.security.AccessController.doPrivileged(Native Method)
    2011-07-18 15:53:45 [SEVERE]     at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.awt.EventQueue.dispatchEvent(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    2011-07-18 15:53:45 [SEVERE]     at java.awt.EventDispatchThread.run(Unknown Source)
     
  8. Offline

    SilverstarX

    wassilij likes this.
  9. Offline

    wassilij

    :)

    Oh and i have BukkitContrib.
     
  10. Offline

    wassilij

    Bukkit 1000

    Code:
    2011-07-19 13:49:51 [SEVERE] Exception in thread "AWT-EventQueue-0"
    2011-07-19 13:49:51 [SEVERE] java.util.ConcurrentModificationException
    2011-07-19 13:49:51 [SEVERE]     at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.util.ArrayList$Itr.next(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at org.bukkit.craftbukkit.CraftWorld.getPlayers(CraftWorld.java:551)
    2011-07-19 13:49:51 [SEVERE]     at org.bukkit.craftbukkit.CraftWorld.setFullTime(CraftWorld.java:405)
    2011-07-19 13:49:51 [SEVERE]     at org.bukkit.craftbukkit.CraftWorld.setTime(CraftWorld.java:394)
    2011-07-19 13:49:51 [SEVERE]     at me.silverstar.timefold.TimeFoldActionListener.actionPerformed(TimeFoldActionListener.java:71)
    2011-07-19 13:49:51 [SEVERE]     at javax.swing.Timer.fireActionPerformed(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at javax.swing.Timer$DoPostEvent.run(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.awt.EventQueue.access$000(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.awt.EventQueue$3.run(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.awt.EventQueue$3.run(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.security.AccessController.doPrivileged(Native Method)
    2011-07-19 13:49:51 [SEVERE]     at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.awt.EventQueue.dispatchEvent(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    2011-07-19 13:49:51 [SEVERE]     at java.awt.EventDispatchThread.run(Unknown Source)
     
  11. Offline

    SilverstarX

    @wassilij
    Err... You posted that already yesterday, you know?
     
  12. Offline

    wassilij

    Oh .. sorry i forget ^^
     
  13. Offline

    unl33t

    ok, so I started playing with some of the current non-promoted craftbukkit builds. (currently 1036, I need something after 1025 for multiverse to work) the x11 error has gone away, but it's still having trouble with the multiple worlds.

    Code:
    TimeFold.Settings
    
    World:3:1
    HuntingGrounds:2:1
    Skylands:3:1
    BuildLands:9999:1
    
    Code:
    TimeFold_report.txt
    
    Server Version git-Bukkit-0.0.0-958-g65a55ba-b1036jnks (MC: 1.7.3)
    TimeFold Version 0.4.2
    Loaded worlds: [CraftWorld{name=World}, CraftWorld{name=HuntingGrounds}, CraftWorld{name=Skylands}, CraftWorld{name=BuildLands}]
    Configured worlds: {00=World, 01=3, 02=1}
    
    mvlist
    2011-08-02 11:41:03 [INFO] Worlds which you can view:
    2011-08-02 11:41:03 [INFO] HuntingGrounds - NORMAL
    2011-08-02 11:41:03 [INFO] BuildLands - NORMAL
    2011-08-02 11:41:03 [INFO] Skylands - SKYLANDS
    2011-08-02 11:41:03 [INFO] World - NORMAL
    timefold World
    2011-08-02 11:37:54 [INFO] It's day 1 of 3
    timefold HuntingGrounds
    2011-08-02 11:38:00 [INFO] TimeFold is not configured for this world.
    timefold BuildLands
    2011-08-02 11:38:05 [INFO] TimeFold is not configured for this world.
    timefold Skylands
    2011-08-02 11:38:12 [INFO] TimeFold is not configured for this world.

    but if i reload TimeFold I get. (same results using /reload or /plugman reload timefold)
    Code:
    TimeFold_report.txt
    Server Version git-Bukkit-0.0.0-958-g65a55ba-b1036jnks (MC: 1.7.3)
    TimeFold Version 0.4.2
    Loaded worlds: [CraftWorld{name=World}, CraftWorld{name=HuntingGrounds}, CraftWorld{name=Skylands}, CraftWorld{name=BuildLands}]
    Configured worlds: {21=3, 20=Skylands, 10=HuntingGrounds, 30=BuildLands, 32=1, 31=9999, 22=1, 00=World, 01=3, 11=2, 02=1, 12=1}
    
    timefold World
    2011-08-02 11:48:42 [INFO] It's day 2 of 3
    imefold Skylands
    2011-08-02 11:48:48 [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'timefold' in plugin TimeFold v0.4.2
    Caused by: java.lang.NumberFormatException: null
    timefold BuildLands
    2011-08-02 11:48:53 [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'timefold' in plugin TimeFold v0.4.2
    Caused by: java.lang.NumberFormatException: null
    timefold HuntingGrounds
    2011-08-02 11:48:59 [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'timefold' in plugin TimeFold v0.4.2
    Caused by: java.lang.NumberFormatException: null

    If I restart the serve, then it goes back to having only World configured. I've even tried moving the order of the worlds in the file, with the same results.

    If there's any other information I can provide to help, let me know.
     
  14. Offline

    Rizal

    I cannot go as multiworld..
    flatlands:20:0
    flatland:20:0

    In flatlands (my main as starting up in the actual config file) it works fine but on flatland when i type /timefold i get this erroe message: Timefold is not configured for this world. hope you can fix it!!!! ;)
     
  15. Offline

    SilverstarX

    Hey guys, big sorry for the delay!
    I was on a unplanned business trip for over a week, I'm going into the issues these days.
     
  16. Offline

    SilverstarX

    Sorry guys, work keeps me very busy these days.

    I compiled v0.4.2 based on bukkit #770, so for craftbukkit #1000.
    Please test and report, I'm currently trying to refactor timefold to get away from java timers so one issue should be shot.

    The second issue that TF is not working for some worlds should be hopefully fixed then too, because I'm reworking so much I think it will be a complete rewrite. Please stay patient, I'll try to bring you a flawless version next time.
     

    Attached Files:

  17. Offline

    ailmanki

    Works perfect,
    world:1:0
    does what I wanted, very nice!

    Would it be possible to have dawn/dusk configurable? Would be nice from time to time a sunrise/set..
     
  18. Offline

    SilverstarX

    So, for example, you want to have day only (1:0) but every two days, the time should not skip before sunset but after, and not skip behind sunrise, but before?
    Like
    Day 1
    Day 2
    Sunset
    Sunrise
    Day3
    Day4
    Sunset
    Sunrise
    [...]
    ?

    I have thrown nearly all the code away and rewrite from scratch, so, yes, I can add this. Maybe not in the next version, but I put it on the todo.
     
  19. Offline

    ailmanki

    Yes exactly that. Thats even better,
    day
    sunset
    sunrise
    day

    then what I had in mind
    day
    sunset
    day
    .. :)

    There is actually only one flaw in all this, the sun.
    Having 1:0 now, moves the sun everytime back to its "correct" position. It would be nice if the sun would just reverse direction. At best between sunset and sunrise. I hope Minecraft allows that.
    Though I don't know if with sunset and sunrise the sun gets hidden behind the horizont. The idea was to have always day, but not peacefull enabled, for some hunting in caves, or dark spots.

    Btw the plugin works fine with bukkit #1060 and #1058. Thanks!
     
  20. Offline

    Snaipe

    the plugin broke when I installed multiverse 2.0... Are these compatible ?
     
  21. Offline

    blokzeil1

    Hello!
    I have an idea for this plugin, Can you add a voting? so people can vote to for day or night.
     
  22. Offline

    SilverstarX

    Nice to hear that it works fine for you. Reverting the direction of the suns movement is nearly impossible to my knowledge. Its the same matter like slower or faster movement, it will give you unwanted side-effects.

    I don't know, I'll try. Currently I would say its not, based on your experience.

    I put that on the todo.
     
  23. Offline

    Priizon

    OMG this is exactly what I needed. I posted it somewhere in the forums that I wanted a way to change how long days and nights lasted, but no one replied. Glad to see it.
     
  24. So why exactly would this not be compatible with Multiverse (if it supports multiple worlds)? Does this plugin load worlds? I can't really see a conflict other than that.
     
  25. Offline

    SilverstarX

    You might have a look at the (ugly! so be warned!) source. I'm currently at rewriting the entire thing from scratch.
    Edit: I do use getWorld(worldname) but never .load, so thats not what you mean?
     
  26. If you use getWorld then I see no reason why this would be incompatabile with MV2. My users are constantly pestering me for Time support, but I'm a UNIX guy, and don't want MV2 to turn into an essentials size plugin, so I'd like to be able to point them at a cool Time Mgmt plugin.

    I noticed you have not yet created your BukkitDev page, you should get on that http://dev.bukkit.org/search/?search=timefold :p
     
  27. Offline

    baem

    when will this be uptaded? or ist ther any other plugin for 1060 if i want always day
     
  28. Offline

    SilverstarX

    Oh, I didn't know that. I must have missed much in the last time :(
    I'll do that asap.

    Try it on 1060, some said it works; I can't warrant that at the moment. But I'm currently rewriting it so there should be a new version in the next days.
     
  29. Offline

    SilverstarX

    Just to keep you informed, I'm working on 0.5 and progressing well, so, if I don't run into massive errors, you may get a beta today/tomorrow and a release this week.
     
  30. Offline

    SilverstarX

    Here it is: 0.5.beta1! (b804/cb1060)
    Please test it and report back.
    It now uses the YAML file format for the settings file, so you will have to rewrite your settings file (sorry!). A example file is included in the zip download (and is auto-created, if run and no config.yml exists).
    Currently, only the basics are working, so only the day/night setting is relevant. All other settings can be changed, but will not affect the game yet.
     

    Attached Files:

  31. Offline

    bobeeb

    seems that the 0.5beta1 did not load?
    we are using 0.42 before
    after update, the /timefold command did not work and the plugin is not listed in the plugin list
    cb1060
    i downloaded te zip file with example config
     

Share This Page