Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
The first function alone should be enough to make the weather constant sunny. The second function is not needed at all (and MCServer ignores the second return value, "-ed" functions are notifications only, meaning "it has already happenned, you cannot do anything about it")
Posts: 313
Threads: 32
Joined: Feb 2012
Thanks: 98
Given 14 thank(s) in 13 post(s)
02-15-2013, 06:53 PM
(This post was last modified: 02-15-2013, 06:53 PM by Taugeshtu.)
I had a thought right now... Is there any way to know if weather was changed via API or automatically by server needs? Because some would like to make the weather constantly sunny, but still be able to have a manual rain sometimes...
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
There is currently no way. If you wanted to make manual rain, have a variable in your Lua code that would signal if the plugin itself is changing weather or it's an external change. Of course, that's limited to a single plugin.
How I would do it, though - make a plugin that can make constant weather, any weather. So then you just switch from "constant sunny" to "constant rain" and back.
Posts: 4,634
Threads: 115
Joined: Dec 2011
Thanks: 695
Given 495 thank(s) in 424 post(s)
can there be a HOOK_PLAYER_MOVED becouse HOOK_PLAYER_MOVING keeps activating even if i don't move
Posts: 1,450
Threads: 53
Joined: Feb 2011
Thanks: 15
Given 120 thank(s) in 91 post(s)
Yes you do, just a tiny little bit :O
Posts: 1,450
Threads: 53
Joined: Feb 2011
Thanks: 15
Given 120 thank(s) in 91 post(s)
You move a tiny little bit, otherwise the function is not called. Minecraft slows down the player movement by dividing or something, and that results in ~0.000001 units of movement per tick
Posts: 4,634
Threads: 115
Joined: Dec 2011
Thanks: 695
Given 495 thank(s) in 424 post(s)
no i am not moving at all but it still keeps calling it
Posts: 1,450
Threads: 53
Joined: Feb 2011
Thanks: 15
Given 120 thank(s) in 91 post(s)
If you don't move for a whole minute it still gets called?
Posts: 4,634
Threads: 115
Joined: Dec 2011
Thanks: 695
Given 495 thank(s) in 424 post(s)
jup i added LOG("TEST") and my console spammed completly. about every 1-2 seconds i got TEST in my console