WeatherChangeEvent 5.46.0
Extends WorldEvent
Implements Cancellable
Called when the weather of a world is about to change (natural cycle, /weather, sleeping through the night or a plugin). Cancelling it keeps the current weather; the natural cycle then waits for its next change.
Methods
__construct()
php
public function __construct(\pocketmine\world\World $world, bool $wasRaining, bool $wasThundering, bool $raining, bool $thundering)isRaining()
php
public function isRaining() : boolWhether it will be raining (or snowing) after the change.
isThundering()
php
public function isThundering() : boolWhether there will be a thunderstorm after the change (always raining too).
wasRaining()
php
public function wasRaining() : boolwasThundering()
php
public function wasThundering() : bool