TimeShift
TimeShift
Tazzernator, cjc343
Deutsch config.yml from RasCas
Summary:
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 multiple 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 [x]' command is used. It also offers Bukkit permission nodes which are available by default to ops.
You can easily modify what messages TimeShift displays and who sees them using the configuration file which is generated when TimeShift is first run. This allows you to localize TimeShift in your own language or simply control who sees announcements. If you decide to localize TimeShift, you should send me your config!
The links below provide more information on configuring and using TimeShift. Simply click "Main" at the top to return to this page. If you are currently browsing via minecraft.curse.com, please follow this link. The sub-pages do not work on curse.com yet, and at this rate (and knowing curse) they never will. DBO provides a much cleaner, easier to read, limited-ad (320 pixels of affiliate links) place to view Bukkit plugins.
For some reason TimeShift randomly broke, adn whenever I use a timeshift command I get this error:
03.10 14:29:53 [Server] INFO Connection reset 03.10 14:28:33 [Server] INFO ... 15 more 03.10 14:28:33 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) 03.10 14:28:33 [Server] INFO at tazzernator.cjc.timeshift.TimeShiftCommandParser.onCommand(TimeShiftCommandParser.java:194) 03.10 14:28:33 [Server] INFO at tazzernator.cjc.timeshift.TimeShiftCommandParser.stopShift(TimeShiftCommandParser.java:90) 03.10 14:28:33 [Server] INFO at tazzernator.cjc.timeshift.TimeShift.cancelShift(TimeShift.java:337) 03.10 14:28:33 [Server] INFO Caused by: java.lang.NullPointerException 03.10 14:28:33 [Server] INFO at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583) 03.10 14:28:33 [Server] INFO at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421) 03.10 14:28:33 [Server] INFO at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488) 03.10 14:28:33 [Server] INFO at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227) 03.10 14:28:33 [Server] INFO at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:592) 03.10 14:28:33 [Server] INFO at net.minecraft.server.v1_6_R3.DedicatedServerConnection.b(SourceFile:30) 03.10 14:28:33 [Server] INFO at net.minecraft.server.v1_6_R3.ServerConnection.b(SourceFile:37) 03.10 14:28:33 [Server] INFO at net.minecraft.server.v1_6_R3.PlayerConnection.e(PlayerConnection.java:116) 03.10 14:28:33 [Server] INFO at net.minecraft.server.v1_6_R3.NetworkManager.b(NetworkManager.java:296) 03.10 14:28:33 [Server] INFO at net.minecraft.server.v1_6_R3.Packet3Chat.handle(SourceFile:49) 03.10 14:28:33 [Server] INFO at net.minecraft.server.v1_6_R3.PlayerConnection.a(PlayerConnection.java:834) 03.10 14:28:33 [Server] INFO at net.minecraft.server.v1_6_R3.PlayerConnection.chat(PlayerConnection.java:877) 03.10 14:28:33 [Server] INFO at net.minecraft.server.v1_6_R3.PlayerConnection.handleCommand(PlayerConnection.java:959) 03.10 14:28:33 [Server] INFO at org.bukkit.craftbukkit.v1_6_R3.CraftServer.dispatchCommand(CraftServer.java:523) 03.10 14:28:33 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192) 03.10 14:28:33 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) 03.10 14:28:33 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'shift' in plugin TimeShift v3.0 03.10 14:28:33 [Server] SEVERE null
plus my server time is still going, and it's going through day/night but the sun is stuck in the sky. I haven't altered anything in the config at all.
It would be useful if you included a data file to save all the shifts in different worlds.
Can someone update this plugin for 1.4.7 please!
CJC,
I apologize if this seems like a dumb comment, but I am having trouble following the advanced configuration information. I want to add a custom command that sets the day to run for 15-minutes, sunset/sunrise for 1.5 each (total of 3-minutes), and night for 2-minutes. However, when I try to follow the example of an advanced configuration, I am having trouble understanding what of those options I can customize.
Could you possibly give me a brief example of how I could do the above or how I could do anything? I've tried to find anything at all to answer my question and even tried making my own based off the example advanced config but I failed to do something correctly. Any help would be greatly appreciated.
Thanks, Matt
@PAL18
Aside from a bug I noticed with the 'stop' text for '/shift startup' commands appearing incorrectly, it appears to be working just fine.
Will this be updated for 1.4.2?
@Psithief
it's supposed to be:
not sure how 'true' ended up there.
Enabling classic mode makes TimeShift poll for time changes instead of trying to intelligently schedule timers. I would not recommend turning it on unless you are encountering issues with 3.0, in which case I'd like to hear more about the issues.
I assume this was from a config file which was updated automatically, and not from a fresh copy?
Um.. 'true'? What's that supposed to be? classic: true?
@cjc343
I tested that myself, all you see is monsters spawning in the day. The client doesn't appear to make any assumptions about when monsters should spawn or spontaneously combust in sunlight.
@Psithief
Well that certainly simplifies things.
I've just released an update that brings a very old feature request (able to colorize strings), semi-unintentionally implements a feature I didn't really want to implement (custom time progression settings), and generally updates the underlying code base to be more efficient and more versatile than it was before, and much easier to add the ability to freeze time per world by freezing the players on the world, or freeze or loop time per player.
With setPlayerTime that might be 100x easier than I was thinking it would... though I'm curious what'll happen when I set the world to night and myself to day...
@cjc343
No need to build against CraftBukkit, there's a method for Player called setPlayerTime. If the boolean parameter is false then the client time does not update!
Yes the client is a bit jaggy, but I don't think there's any change in the number of time packets being sent. Looking at the server code it appears each second (20 ticks) every player is sent a time update packet as part of normal server operation. See method q() for details.
@RasCas
Thanks!
Here a german translation:
strings:
shift:
string: 'Die Zeit auf der Welt: [%world] hat sich plötzlich verändert.'
destination: server-announce
cancel:
string: 'Die Zeit auf Welt: [%world] scheint wieder normal zu verlaufen.'
destination: server-announce
startup:
shift:
string: 'Die Welt: [%world] ist nach einem Neustart in einer %setting - Zeitschleife
gefangen'
destination: player
cancel:
string: 'Welt: [%world] wird nach dem Neustart nicht mehr in einer Zeitschleife
gefangen sein'
destination: player
errors:
error-logging: true
dne: 'Die Welt: [%world] existiert nicht!'
shift-permission: 'Um dies zu tun benötigst Du das Zugriffsrecht: timeshift.shift'
startup-permission: 'Um dies zu tun benötigst Du das Zugriffsrecht: timeshift.startup'
console-specify: Du musst eine Welt angeben, wenn Du die Console benutzt.
no-perm: Du hast leider keinen Zugriff auf die TimeShift Kommandos.
help:
console: 'Anwendung: shift <day | night | stop | sunrise | sunset | setrise> <world(s)>'
shift-only: 'Anwendung: /shift <day | night | stop | sunrise | sunset | setrise>'
startup-only: 'Anwendung: /shift startup <day | night | stop | sunrise | sunset
| setrise> -- sets startup and /reload behavior only'
shift-startup: 'Anwendung: /shift <day | night | stop | sunrise | sunset | setrise
| startup [option]>'
@Psithief
I had not considered or tried it. It would likely be a far more viable solution than setting the server to keep the time at noon.
I have two concerns about how well it might work:
1. One of the issues with 'very short' time periods (aside from redstone breaking) was the jumpiness of the sun, which could easily be seen moving slightly then jumping backwards. Without being able to stop the sun from progressing client side, there may still be similar choppiness, which brings me to my second concern:
2. Frequent time update packets (to achieve 'very short' time periods) could be a significant increase in packets for both clients and servers, especially for larger servers who might see too large a performance hit from the increased network traffic multiplied by the number of players on world(s).
Of course, no one would be forced to use a noon setting, but that wouldn't stop people who shouldn't from getting angry over it slowing their server down, which is a very big part (on top of the other things that would break) of why I have not made builds with 'very-short' noon-like settings done via the server time available publicly.
I will be looking into changing time via packets a bit this weekend (and probably next too), but I'm very wary of building against CraftBukkit and am highly unlikely to release it publicly due to my concerns above. For anyone interested in testing out packets anyways, I'd be interested in hearing a bit more about your server(s), average+max # of users, and whether you'd be able to help test increases in packet load.
@cjc343
Have you considered just sending time-altering packets to the Player to keep the sun at Noon even though it's only looping dawn to dusk on the server?
@cjc343
Oh well. Was trying to re-create old skyland where it was always noon..
Still like this plugin regardless.
@asb1230
Thanks! Always nice to hear from people who like it.
Haven't been on bukkit in a while so I just want to say your plugin is awesome. I use it all the time on my server!
@NazzyDragon
I assume by "noon" you mean you want to sun to not move?
Unfortunately, doing so causes Minecraft to become unstable and breaks redstone. I've tried doing very short periods, which on smaller servers will often work, but there's still a very noticeable jump when the time changes, even if redstone continues to work.
Can you add noon? So I can /shift startup noon? :>