[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

    cjc343

    @fifth @Shalobee
    Ok, I think I've caught your bug (and oh what a silly one -- converting input to lowercase and then everything else is case sensitive).

    I'm making 2 new versions available:

    1.5.0.2:
    - Incorporates fixes from 1.5.2 code.​
    - Fixed world name case issue.​
    - Released for 560-, should be compatible with at least 480-556, tested on 556.​
    - Only available via Archive

    1.5.2.1:
    - Fixed world name case issue.​
    - Released for 602+​

    1.5.2.1 is currently being pushed as the latest version.

    1.5.0.2 is available for download here.
     
    Tazzernator likes this.
  3. Offline

    JimmyD

    Giving a false positive that it's working for build #606.

    Please fix?
     
  4. Offline

    cjc343

    I will test on 1.4 once I get home. I would appreciate if you'd update to 612, paste your server startup log, and tell me what command you used if you have a minute as that info is often useful when I'm testing.
     
    Tazzernator likes this.
  5. Offline

    JimmyD

    612 Isn't working. Best one I could actually log on to my server is #609.
    But yeah, I'll give you the log of what it says when I type in /shift day.

    It says nothing. I'm only getting random errors with xWarp, but it's still functioning, but TimeShift is not.
     
  6. Offline

    cjc343

    It appears something is wrong with the time since 1.4. It seems I can still change the time, but can't properly retrieve it. I'll be filing a bug report with the bukkit team.

    E: @EvilSeph It appears World.getTime() is broken in 612.

    @JimmyD @Lief
    TimeShift is now working again as of CB build 615. Thanks for your patience.

    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.
  7. Thx for the update.
     
  8. Offline

    cjc343

    TimeShift 1.5.2.1 is working just fine on CB 670, the latest RB.
     
  9. Offline

    cjc343

    TimeShift 2 is now available via the link in the first post.

    2.0:
    - Announcements can now be modified via 'config.yml'​
    - Startup settings are now stored differently. They will be automatically converted.​

    The config.yml file will be generated the first time you run TimeShift 2. It allows customization of the messages sent when the /shift command is used, including success, help, and error strings. The file should be fairly self explanatory except for a few options:

    'destination' controls who receives notices that the time has shifted or a shift has been cancelled. Valid options are 'player' 'server-announce' and 'world-announce'

    'error-logging' controls whether the console should log when players try to use a command they don't have permission for, or on a non-existent world. Valid options are 'true' or 'false'

    '%world' will be replaced with the world name. It is not valid for help entries.
    '%player' will be replaced with the name of the player executing the command. It is not valid for help entries.
    '%setting' will be replaced with the action specified. It is not valid for help or error entries.
     
  10. Offline

    Steve Cole

    just updated now i get this in my console (lines marked with "*")
    Code:
    06:56:39 [INFO] LWC    Loading shared objects
    06:56:39 [INFO] LWC    Native library: plugins/LWC/libsqlitejdbc.jnilib
    06:56:39 [INFO] [Permissions] (Phoenix) was Initialized.
    * 06:56:39 [SEVERE] ebean.properties not found
    * 06:56:39 [INFO] DataSourcePool [TimeShift] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
    * 06:56:39 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
    * 06:56:39 [INFO] Entities enhanced[0] subclassed[1]
    06:56:39 [INFO] Backup v1.4 was sucessfully loaded!
    06:56:39 [INFO] [BlocksLog]  Loading Blocks!
    06:56:39 [INFO] BlockLog version 1.2.9 is enabled!
    
    
     
    cjc343 likes this.
  11. Offline

    cjc343

    Thanks for the notice, but this is ok!

    If you wish to get rid of the first line, simply create a new file in the same folder as your server.properties called 'ebean.properties' you don't need to add anything to it, it can be entirely blank.

    The 2nd-4th lines are letting you know that TimeShift is using bukkit's built-in persistence (ebean). Similar lines are output by craftbukkit for any plugin that implements persistence.
     
  12. Offline

    Steve Cole

    thank
    also i get an error when i use /shift startup day
    it says an internal error occured

    Code:
    17:23:09 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'shift' in plugin TimeShift v2.0
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:254)
        at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:626)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:589)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:583)
        at net.minecraft.server.Packet3Chat.a(SourceFile:24)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.NullPointerException
        at tazzernator.cjc.timeshift.TimeShiftPersistentReaderWriter.persistentWriter(TimeShiftPersistentReaderWriter.java:80)
        at tazzernator.cjc.timeshift.TimeShiftCommandParser.setPersist(TimeShiftCommandParser.java:39)
        at tazzernator.cjc.timeshift.TimeShiftCommandParser.handleCommand(TimeShiftCommandParser.java:239)
        at tazzernator.cjc.timeshift.TimeShift.onCommand(TimeShift.java:184)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    
     
    cjc343 likes this.
  13. Offline

    cjc343

    That one's definitely a bug -- looks like I forgot a case. I've uploaded a new version that should fix this, but I don't have access to my server right now, so I can't confirm it.

    I'll double check when I get home to make sure this works, but that will be several hours.

    The issue appears to be fixed on my end.

    The version currently posted is 2.0.1

    2.0.1:
    - Fixed adding start-up settings for worlds that did not previously have a start-up setting.​

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

    Steve Cole

    thanks, it works now.
     
    cjc343 likes this.
  15. Offline

    icomeinpieces

    getting this from CB684

    not sure if it is coming from this plugin or not but i believe it is

    2011-04-21 21:14:39 [INFO] [Permissions] (Phoenix) was Initialized.
    2011-04-21 21:14:39 [SEVERE] ebean.properties not found
    2011-04-21 21:14:39 [INFO] DataSourcePool [TimeShift] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
    2011-04-21 21:14:40 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
    2011-04-21 21:14:40 [INFO] Entities enhanced[0] subclassed[1]
    2011-04-21 21:14:40 [INFO] [WormholeXTreme][v0.833][By Lologarithm & alron]Load Beginning.
     
    cjc343 likes this.
  16. Offline

    cjc343

    This is coming from TimeShift but it is nothing to worry about. TimeShift uses ebeans, which bukkit provides for persistent data storage. If you want to get rid of the "Severe" message, create a 'ebean.properties' file alongside your server.properties file.

    As far as I can tell, TimeShift is working perfectly on 705+ so I'm expecting it will be fine when the next RB comes around.
     
  17. Offline

    JD DeGaetano

    Im running CB 712. The message "The time suddenly shifts on [world]" pops up.

    Yea. Nothing happens.

    **EDIT**
    I did figure out though that it does not shift the time until I reload the server. Also the console is not throwing any error messages.
     
  18. Offline

    cjc343

    Are you sure you didn't use a "/shift startup [x]" command? Using "/shift [x]" should shift immediately, but startup waits for a reload. I just tested with 714 and did not have any issues setting startup settings or setting immediate actions.
     
  19. Offline

    icomeinpieces

    thnx does anything need to go into the that properties file?
     
  20. Offline

    cjc343

    If you want/need to set up advanced ebean properties, you may need to add things there. Most users only need a blank file.

    Bukkit defaults to using sqlite for persistent storage. This can be modified in the bukkit.yml file to switch to a MySQL server instead (and others? I don't know).

    If you are using a MySQL server, you'd probably want to set up your ebean.properties file as well as the bukkit.yml file. If you aren't, you can leave it blank, and that's all that's needed.
     
  21. Offline

    icomeinpieces

    i am using MySQL for other plugins so i might as well set that up for bukkit :) i'll go look for what can go into that file. In the event i don't find much, any suggested reading material i can look at to properly set it up?

    i have the ebean.properties file and i modified the bukkit.yml

    it now says:
    database:
    username: minecraft
    isolation: SERIALIZABLE
    driver: com.mysql.jdbc.Driver
    password: minecraft
    url: jdbc:mysql://192.168.0.200/minecraft

    my ebeans.properties file is still empty

    my timeshift still says:
    CONSOLE: DataSourcePool [TimeShift] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
    CONSOLE: DatabasePlatform name:TimeShift platform:mysql
    CONSOLE: SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
    CONSOLE: Entities enhanced[0] subclassed[1]

    what does this mean?? thanks in advance

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

    cjc343

    Here's a "getting started" page that includes an example ebean.properties. If you don't need to fine-tune the connection, your bukkit.yml should be sufficient.

    Those lines are just saying that TimeShift is using Persistence and that mysql is being used instead of sqlite. They contain some basic debug info that is output by bukkit -- I have no control over them.
     
  23. Offline

    icomeinpieces

    ah ok thanks for the info and link
     
  24. Offline

    cjc343

    TimeShift is working with 733! Let me know if you have any issues.
     
  25. Offline

    jordanneil23

    I usually don't post about bugs but, when trying to use the plugin after CB 733 was released it wont work right for me, /shift startup has this error
    Code:
    20:08:06 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'shif
    t' in plugin TimeShift v2.0.1
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85
    )
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:2
    55)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
    java:675)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:638)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:632)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: javax.persistence.PersistenceException: Unique expecting 0 or 1 rows
    but got [4]
            at com.avaje.ebeaninternal.server.core.DefaultServer.findUnique(DefaultS
    erver.java:1242)
            at com.avaje.ebeaninternal.server.querydefn.DefaultOrmQuery.findUnique(D
    efaultOrmQuery.java:924)
            at com.avaje.ebeaninternal.util.DefaultExpressionList.findUnique(Default
    ExpressionList.java:217)
            at tazzernator.cjc.timeshift.TimeShiftPersistentReaderWriter.persistentW
    riter(TimeShiftPersistentReaderWriter.java:79)
            at tazzernator.cjc.timeshift.TimeShiftCommandParser.setPersist(TimeShift
    CommandParser.java:39)
            at tazzernator.cjc.timeshift.TimeShiftCommandParser.handleCommand(TimeSh
    iftCommandParser.java:239)
            at tazzernator.cjc.timeshift.TimeShift.onCommand(TimeShift.java:184)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    /shift has no error but does not work.
    It just says "20:10:19 [INFO] The time suddenly shifts on [town]" (In console)
    I enjoy this plugin, and would love to know why it will not work. If you need any more information just ask me :)
     
  26. Offline

    cjc343

    Eek! By any chance, did you upgrade to 2.0.1 from an earlier version recently? I think I know what happened if so...

    Rename the TimeShift.db file. Your startup settings should be gone, but TimeShift should work again and you'll be able to change them.
     
    jordanneil23 likes this.
  27. Offline

    jordanneil23

    Thanks, it works now.
     
    cjc343 likes this.
  28. Offline

    Duulicious

    So with this plugin could I have normal day/night cycle on one world and continuous day on another world?
     
  29. Offline

    cjc343

    Yes. Commands default to the world they are used on. You can read more about it in the first post.
     
  30. Offline

    barbednails

    I'm not sure if I am doing something wrong, but this mod will not work at all. There is no .jar file in all of the zipped information, and when putting the zipped file into the plugin folder nothing happens. Is there a way to remedy this?
     
  31. Offline

    cjc343

    All the links lead to jars afaik.. Is it possible you are accidentally unpacking the jars?
     

Share This Page