return null;
}
@Override
public void change(final Event e, final @Nullable Object[] delta, final ChangeMode mode) {
final WeatherType t = delta == null ? WeatherType.CLEAR : (WeatherType) delta[0];
for (final World w : getExpr().getArray(e)) {
assert w != null : getExpr();
if (getTime() >= 0 && e instanceof WeatherEvent && w.equals(((WeatherEvent) e).getWorld()) && !Delay.isDelayed(e)) {
if (e instanceof WeatherChangeEvent) {
if (((WeatherChangeEvent) e).toWeatherState() && t == WeatherType.CLEAR)
((WeatherChangeEvent) e).setCancelled(true);
if (((WeatherChangeEvent) e).getWorld().isThundering() != (t == WeatherType.THUNDER))
((WeatherChangeEvent) e).getWorld().setThundering(t == WeatherType.THUNDER);
} else if (e instanceof ThunderChangeEvent) {
if (((ThunderChangeEvent) e).toThunderState() && t != WeatherType.THUNDER)
((ThunderChangeEvent) e).setCancelled(true);
if (((ThunderChangeEvent) e).getWorld().hasStorm() != (t != WeatherType.CLEAR))
((ThunderChangeEvent) e).getWorld().setStorm(t != WeatherType.CLEAR);
}
} else {
t.setWeather(w);
}
}
}