Posts: 6,486
Threads: 176
Joined: Jan 2012
Thanks: 40
Given 157 thank(s) in 838 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: 74
Given 6 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,486
Threads: 176
Joined: Jan 2012
Thanks: 40
Given 157 thank(s) in 838 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,621
Threads: 113
Joined: Dec 2011
Thanks: 51
Given 58 thank(s) in 410 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: 0
Given 39 thank(s) in 90 post(s)
Yes you do, just a tiny little bit :O
Posts: 1,450
Threads: 53
Joined: Feb 2011
Thanks: 0
Given 39 thank(s) in 90 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,621
Threads: 113
Joined: Dec 2011
Thanks: 51
Given 58 thank(s) in 410 post(s)
no i am not moving at all but it still keeps calling it
Posts: 1,450
Threads: 53
Joined: Feb 2011
Thanks: 0
Given 39 thank(s) in 90 post(s)
If you don't move for a whole minute it still gets called?
Posts: 4,621
Threads: 113
Joined: Dec 2011
Thanks: 51
Given 58 thank(s) in 410 post(s)
jup i added LOG("TEST") and my console spammed completly. about every 1-2 seconds i got TEST in my console