[MECH][FUN] TimeShift 2.0.1 ~ Change Time on-the-fly! [b1337]

Discussion in 'Inactive/Unsupported Plugins' started by Tazzernator, Jan 19, 2011.

  1. Offline

    Tazzernator

    Xordaii, arpey, Steve Cole and 2 others like this.
  2. Offline

    Bjourk

  3. Offline

    MacG32

    Confirmed working with build #556. [​IMG]
     
  4. Offline

    cjc343

    The static link shall be http://timeshift.bukkit.save-my-computer.com/TimeShift.jar now to go see if I actually set up that sub-domain and to upload the current version. I've been putting off setting up a static link before updating, but I've been putting off updating until it actually breaks...
     
    Tazzernator likes this.
  5. Offline

    GriffinGuy10

    Erm noob question: Does this have permissions support? I can't use it if it doesn't.
     
  6. Offline

    Tazzernator

    In the Original Post, it says "- These commands require timeshift.shift permission if Permissions is installed."
     
    cjc343 likes this.
  7. Offline

    Darkwizard98

    for me Time Instantly Returns to normal when i try to stop it
     
  8. Offline

    cjc343

    1.5 is now available with sunrise and sunset support among other changes. See the Change Log for more.


    TimeShift
    Tazzernator, cjc343

    Download:
    Old

    TimeShift gives you control over how time progresses on your server. It allows you to set both the current behavior and the startup behavior for any world to progress normally, loop day, or loop night. It also offers some options for sunrise and sunset.

    TimeShift attempts to play nice with other plugins that reserve the '/time' command by cancelling active shifts on a world if a /time command is used. It also offers optional Permissions support.

    Command Reference:
    Live Commands:
    • /shift day -- Starts current world looping day.
    • /shift night -- Current world loops night.
    • /shift stop -- Current world stops looping.
    • /shift sunrise -- Current world loops sunrise. Frequent time changes may cause lag.
    • /shift sunset -- Current world loops sunset. Frequent time changes may cause lag.
    • /shift setrise -- Current world loops both sunrise and sunset without day or night. Frequent time changes may cause lag.
    • /time -- Cancels an active shift to avoid interfering with other plugins.
    - These commands require timeshift.shift permission if Permissions is installed.

    Startup Commands:
    • By default, a world will not loop on startup.
    • You can control startup loop behavior with the following command:
      • /shift startup <behavior> -- Sets startup behavior
      • <behavior> can be any of the Live behaviors: day, night, stop, sunrise, sunset, or setrise
    • These commands do not change the current behavior, only what the server will do next time it starts (or is '/reload' ed).
    - These commands require timeshift.startup permission if Permissions is installed.

    MultiWorld Support:
    • By default, commands will apply to the world the player is in.
    • If you wish to change a different world, simply enter one or more worldnames after the command to change only those worlds.
      • /shift day world otherworld -- Loops day on world and otherworld
      • /shift startup night world world2 -- Sets startup behavior for world and world2 to night.

    Permission Nodes:
    Three Permission Nodes are available:
    • 'timeshift.shift' -- Gives control over current behavior and ability to cancel commands.
    • 'timeshift.cancel' -- Gives permission to cancel shifts when using the /time command only.
    • 'timeshift.startup' -- Gives permission to set startup behavior.

    Change Log:
    1.5:
    - Added Sunset, Sunrise, and Set/Rise-Combo support.While I have previously viewed feverdream's code, I did not try to use his code while adding this, but may have picked the same numbers in the end. Nevertheless, this added code is released under the AGPLv3 license along with the entire TimeShiftRunnable class. All of TimeShift is Open Source.​
    - Changed how Permissions is loaded.​
    - TimeShift is now thread-safe, although as far as I know, its un-thread-safeness never caused problems before.​

    1.4.4.1:
    - Changed how the /time command is handled to add support for 454+.​

    1.4.4:
    - Added full world-name support.​

    1.4.3.2:
    - Changed the the constructor for two classes to comply with the new bukkit standards.

    1.4.3:
    - Refactored/Optimized code.
    - Uses yml to request /shift commands.
    - New storage method.
    - Namespace changed.

    1.4.2:
    - Optimized code, initial refactor for multi-world.


    1.4.1:
    - Recompiled 1.4 for 271 -- Temporary Build.

    1.4:
    - Added optional Permissions support.
    - Added server startup behavior.

    1.3b:
    - set/getTime() functions were moved from server to world.

    Developers:
    Tazzernator & cjc343
    feverdream: Kindly provided open-source time logic to the community, which is adapted in part for use in the AGPLv3 TimeShiftRunnable class (Currently less than 8% of TimeShift, including comments, and less than 6% not including comments! Recently underwent expansion!).


    You'll need to describe what commands you've used, what you expect, and what's happening in greater detail. I can't figure out what's wrong from your description so far. Server logs from startup are often useful, as is knowledge of what commands you used in what order with expected and actual results.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 6, 2016
    Tazzernator likes this.
  9. Offline

    feverdream

  10. Offline

    Tazzernator

    <5% now. <5% ... without comments!

    Nice Work with Noon/Extend Day - GG :)
     
    cjc343 likes this.
  11. I'm using CB version 531 (atleast I think that's the version) and TS version 1.5. I used the /shift day command and the output was: Thime suddenly shifts on [Lulz]. That set the time to day, but when the night came, nothing happened. The same with /shift startup day.
     
  12. Offline

    cjc343

    I just loaded 1.5 and 531 on my test server, typed /shift stop (configured for day on start last I checked), watched as time slowly became night, typed /shift day, watched as time became day, and then stared at sun while I began writing this post. I tracked the sun through the sky until finally it reached the horizon. Upon reaching the horizon, it snapped back to the beginning of day.

    I then loaded build 556, the latest RB, and did the same thing, with the same results. As far as I can tell, TimeShift is working just fine still.

    Please post a full log of your server start-up and actions. Please also post any plugins you are using that do not display any "enabled" message.
     
    Tazzernator likes this.
  13. Offline

    RTRD

    I get this error:
    Code:
    2011-03-24 16:22:35 [SEVERE] Could not load plugins\TimeShift.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:69)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
    at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:260)
    at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:196)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:229)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:645)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:608)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:602)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:76)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: 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:56)
    ... 17 more
     
  14. Offline

    cjc343

    What CB build are you running? Have you tried re-downloading TimeShift?

    I could have sworn this was working with 1.4.4.1, and I didn't think I made any changes to that part of the code since then... I'm looking into this now. That said, when something isn't working as advertised in TimeShift, I'd love it if you'd report it here.

    TimeShift v. 1.5.0.1 is now available at the static link.

    Change Log:

    1.5.0.1:
    - Fixed response to '/time' commands.​

    Known Issues:

    TimeShift currently works through the latest Recommended Build, 556. Builds 561+ change several names which break Permissions support. TimeShift will continue to function on builds for 561+, but will give everyone full permissions.

    The update to TimeShift that will solve this will break Permissions support for all the current Recommended Builds. I will have an update that solves this soon, but it will be for early-adopters only, and will not be pushed to the static link until a new RB is released.

    E:

    TimeShift v. 1.5.1 is now available for early-adopters here.

    Change Log:

    1.5.1:
    - Fixed Permissions support for CB 561+​

    Known Issues: Permissions won't work on pre-561 builds, use 1.5.0.1 for Permissions support.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 6, 2016
    Tazzernator likes this.
  15. Offline

    Techcuron

    Can't you Remove or edit the TimeShift broadcast for players?
    So that it dose not announce "The time suddenly shifts on ******".
     
  16. Offline

    ZachBora

    Sorry, I thought it was a feature.

    I'd rather he doesn't remove it. Maybe make it an option. I like to know who is doing a "Time War".

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

    cjc343

    Ok, I guess I didn't word it clearly enough in my description :/

    The intended behavior is that it cancels a shift when a /time command is used by a player who has permission to cancel a shift. When a /time command is used by a player who does not have permission to cancel a shift, it snaps back, but if the player has permission to cancel a shift, the shift should end.

    Are you saying this is what you expect and want, or that what you want is for /time to never cancel a shift, no matter who uses it? I should be able to add this in as a feature instead of a bug if it is what you want.

    I've personally always wanted it to be a world broadcast instead of a server broadcast.

    I'll look into adding some config options, but make no guarantees that anything is actually coming.
     
    Tazzernator likes this.
  18. Offline

    ZachBora

    No that's fine, making /time cancel shift is what's expected.
     
  19. Offline

    cjc343

    Would you find a feature that allows you to remove TimeShift's /time behavior for a player who has permission for /shift useful? Or have I mostly misunderstood what you've wanted this whole time?
     
    Tazzernator likes this.
  20. Offline

    ZachBora

    Honestly I stopped using the plugin because some people wanted night but most want day. We're mostly using lightvote now and anyone can start it.
     
  21. Offline

    Tazzernator

    right? haha :p -- going backwards breaks redstone. :s

    OP Updated.
     
    cjc343 likes this.
  22. Offline

    cjc343

    Ok, cool, thanks for humoring my questions.

    In my mind, it snapped back, in the code, it most certainly snapped forward. (Pesky redstone...)

    Thanks for updating the OP, but the permissions fix is in 1.5.1 and the /time fix is 1.5.0.1 :p

    1.5.1 is only available through this link right now because it does not work with the current RBs (only 561+), while 1.5.0.1 works with the earlier builds.
     
    Tazzernator likes this.
  23. Offline

    Tazzernator

    woops - fixed. [sheep]
     
    cjc343 likes this.
  24. Offline

    fifth

    "Do you want to be able to use Timeshift commands from the console? ask cjc. maybe"

    REQUEST: SUBMITTED
     
  25. Offline

    cjc343

    Ok, I'll look into refactoring for console support.

    Also, 1.5.1 was killed shortly after release by another CB update. It sounds like CB changes should be stable now/soon so I'll be releasing an update for newer builds soon.

    1.5.2 is now available for CB 594+, but is not being pushed as the "Latest" because it doesn't work with earlier builds.


    Download Link

    1.5.2:
    - Added Console support​
    - Fixed Permissions for latest builds​
    - Prepared to start to try to make strings customizable.​

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 6, 2016
    Tazzernator likes this.
  26. Offline

    Shalobee

    I am having a problem with it actually doing the startup from the file. Here is what my TimeShift.startup file looks like:

    world=-1
    hellworld=13800
    Achlys=13800

    which was created from the /shift commands in game but when I reload hellworld and Achlys both cycle through day. any idea why its not loading the startup file?
     
  27. Offline

    cjc343

    I'm not having any issues -- are there any warnings when you start the server?

    What CB version? What TimeShift version?
     
    Tazzernator likes this.
  28. Offline

    fifth

    Hahaha, bam. That was unexpected and excellent.

    Too bad I still run CB 531! OH WELL.

    Speaking of:

    I am running into this same problems. CB 531, plugins: Commandbook (but with the time command removed), Epiczones, MultiVerse, Permissions, SpawnControl, and WorldEdit, in addition to TimeShift 1.5.01.

    If this is atypical I can try restarting with the nonessential plugins disabled, see if one of them is the problem. Or i guess it could be craftbukkit version compatibility? I could try it with 1.4.4.1 if that's more likely to work.
     
  29. Offline

    Shalobee


    I am on CB 556 and TimeShift 1.5.0.1
    and it doesn't throw any errors when it starts. I thought it might have been an issue where the world was loaded after TimeShift so I changed the jar to zTimeShift.jar to make sure it loaded after the worlds. It didn't seem to have an effect though.
     
    Tazzernator likes this.
  30. Offline

    cjc343

    @Shalobee What other plugins are you running?

    @fifth too: Does it actually loop day instead of night, or does it just not work at all?

    @Shalobee @fifth
    I am unable to reproduce this issue with 556 and 1.5.0.1

    The following info/tests could be useful:

    1. Server startup logs
    2. List of plugins (Shalobee)
    3. Delete TimeShift.startup file and recreate via commands
    4. Delete "world=-1" line
    5. Remove other plugins

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 6, 2016
    Tazzernator likes this.
  31. Offline

    Shalobee

    ok here is a list of my plugins:
    AutoRepair version 1.91
    CraftBookCircuits 3.0-alpha1 enabled.
    CraftBookCommon 3.0-alpha1 enabled.
    CraftBookMechanisms 3.0-alpha1 enabled.
    CraftBookVehicles 3.0-alpha1 enabled.
    CraftBukkitUpToDate version 2.1.5
    CrowdControl version 0.2
    EssentialsServerlist version 2.0.300
    Fake Permissions version 2.5.1
    GroupManager version 1.0(alpha-5)
    MCDocs by Tazzernator
    MyWarp 1.10.3 enabled
    PermissionsSupport version 0.1
    Persistence version 0.61
    Server Port version 274
    Snowballz v1.5 has
    TimeShift version 1.5.0.1
    WorldEdit 4.0-beta8 enabled.
    [Citizens]: version [1.06].
    [DeathTpPlus] version 1.81
    [DynamicMarket] version [0.4.8.9]
    [Hawox's uQuest] v1.01
    [HeroBounty] HeroBounty version
    [MYWARP] Permissions enabled.
    [Vegetation]: Vegetation v2.0
    [iConomy] Logging enabled.
    iMonster version 1.7
    Essentials build 2.0.300
    EssentialsChat build 2.0.300
    EssentialsSpawn build 2.0.300

    and i have attached a snippet from my server.log of the last 800 lines or so. I haven't had time to test your suggestions yet but will as soon as I can.
     

    Attached Files:

Share This Page