@@ -53,7 +53,7 @@ End vote after a timer (1 minute will be baseline)
5353 public boolean onCommand (CommandSender sender , Command command , String label , String [] args ) {
5454 // there should be two types of votes: one where the vote is initiated, and one where the vote is yes/no
5555 if (args .length != 1 ) {
56- String msg = JVoteUtils .printMessage ("Proper usage is &a/vote <day/night/storm/clear>" );
56+ String msg = JVoteUtils .printMessage ("Proper usage is &a/vote <day/night/rain/ storm/clear>" );
5757 sender .sendMessage (msg );
5858 // invalid usage (should be /vote {type of vote}
5959 plugin .logger (Level .WARNING , "Attempted /vote with invalid number of args" );
@@ -89,7 +89,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
8989 sender .sendMessage (JVoteUtils .printMessage ("This vote is on cool down" ));
9090 return true ;
9191 }
92- // TODO: fetch these from some config file. For now, only day/night and clear/storm
92+ // TODO: fetch these from some config file. For now, only day/night and clear/rain/ storm
9393 // invalid usage, return false
9494 currentVoteType = JVoteEnums .valueOf (args [0 ].toUpperCase ());
9595 String msg = JVoteUtils .printMessage (
@@ -105,7 +105,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
105105 }
106106
107107 } catch (IllegalArgumentException e ) {
108- String msg = JVoteUtils .printMessage ("Proper usage is &a/vote <day/night/storm/clear>" );
108+ String msg = JVoteUtils .printMessage ("Proper usage is &a/vote <day/night/rain/ storm/clear>" );
109109 sender .sendMessage (msg );
110110 plugin .logger (Level .WARNING , "Attempted to start /vote with improper argument" );
111111 return true ;
@@ -173,11 +173,20 @@ private void doVote() {
173173 }
174174 }
175175 break ;
176+ case RAIN :
177+ for (World world : Bukkit .getWorlds ()){
178+ if (!world .hasStorm ()) {
179+ world .setWeatherDuration (5 );
180+ }
181+ world .setThundering (false );
182+ }
183+ break ;
176184 case STORM :
177185 for (World world : Bukkit .getWorlds ()){
178186 if (!world .hasStorm ()) {
179187 world .setWeatherDuration (5 );
180188 }
189+ world .setThundering (true );
181190 }
182191 break ;
183192 default :
0 commit comments