}
@CommandDescription (aliases = "weather", usage = "<0|1|2|clear|rain|thunder> (0 = CLEAR, 1 = RAIN/SNOW, 2 = THUNDERSTORM) [world]", desc = "Changes the weather")
@Permissible ("vanilla.command.weather")
public void weather(CommandSource source, CommandArguments args) throws CommandException {
Weather weather = args.popEnumValue("weather", Weather.class);
World world = args.popWorld("world", source);
args.assertCompletelyParsed();
Sky sky = world.get(Sky.class);
if (sky == null) {
throw new CommandException("The sky of world '" + world.getName() + "' is not available.");
}
sky.setWeather(weather);
String message;
switch (weather) {
case RAIN:
message = plugin.getPrefix() + ChatStyle.GREEN + "Weather set to " + ChatStyle.WHITE + "RAIN/SNOW" + ChatStyle.GREEN + ".";
break;
default:
message = plugin.getPrefix() + ChatStyle.GREEN + "Weather set to " + ChatStyle.WHITE + weather.name() + ChatStyle.GREEN + ".";
break;
}
if (getEngine() instanceof Client) {
source.sendMessage(message);
} else {