Minecraft Coden Query Weather?

cu
7

How can one query in an event if it rains? And we call this event? WatherChangeEvent is not it? Would like to spend a message when it rains.

Lo

Weather Change Event # toWeatherState

Gets the state of weather that the world is being set to

Returns:

true if the weather is being set to raining, false otherwise

Ob

For what?
Spigot / Bukkit?
Script?
MCP?
Mod for Labymod or something?
?

cu

Spigot 1.8.8

cu

Can you write an example?

Lo

@EventHandler
public void onWeatherChange (WeatherChangeEvent event) {
if (event.toWeatherState ()) {
System.out.println ("It's going to rain.")
}
}

cu

Thank you! So the message comes first & then it starts to rain?

Lo

Habs not tried, but probably