Open recon88 opened 11 years ago
This is not get time returning null, this is the world being null. The main dimension isn't called "world", it is "overworld". You should use Bukkit.getServer().getWorld(0) to get the main world
Oh wow... How did I miss that? Thanks!
Sorry had to reopen. Just figured out that there is a bug in getTime(). It doesn't reset every 24000 ticks as it should. It keeps running and running... getTime() was at 58000+ during my tests so there is definitly something wrong.
I did the same test with the original Craftbukkit: http://i.imgur.com/yW8LBc8.png It resets after 24000 ticks.
Just modulo it with 24000 for now:
Time % 24000 will equal real time, even after repair :)
That's what I did now for my own uses. But that's no real fix since this my plugin will go public.
Also getFullTime() does not work as it should. Try to use "/set time" and it will not change the full time as it does in bukkit.
Still sitting on that problem ...
I'v got Spoons on the case! Should be fixed soon!
Somehow getTime() is always returning null. Is there a workaround for this? I just wrote a quick plugin which I really want to use but It's not possible. (It works with Craftbukkit)