/<command> [parameter]\r
/<command> sun - Vote for fine weather\r
/<command> rain - Vote for rainy weather\r
+ /<command> storm - Vote for thunder-storm\r
/<command> day - Vote to set the time to morning\r
/<command> night - Vote to set the time to night\r
/<command> yes|no - Respond positive or negative to current vote\r
\r
if ( ! (type.equalsIgnoreCase("sun") ||\r
type.equalsIgnoreCase("rain") ||\r
+ type.equalsIgnoreCase("storm") ||\r
type.equalsIgnoreCase("day") ||\r
type.equalsIgnoreCase("night") ))\r
{\r
w.setStorm(false);\r
else if ( voteType.equalsIgnoreCase("rain"))\r
w.setStorm(true);\r
+ else if ( voteType.equalsIgnoreCase("storm"))\r
+ w.setThundering(true);\r
else if ( voteType.equalsIgnoreCase("day"))\r
w.setTime( plugin.getConfig().getInt("vote.time.dayStart") );\r
else if ( voteType.equalsIgnoreCase("night"))\r
private boolean checkRatio( )\r
{\r
float required = 0.5F;\r
- if ( voteType.equalsIgnoreCase("sun") || voteType.equalsIgnoreCase("rain") )\r
+ if ( voteType.equalsIgnoreCase("sun") || voteType.equalsIgnoreCase("rain") || voteType.equalsIgnoreCase("storm") )\r
required = (float)plugin.getConfig().getInt("vote.weather.requiredPercent") / 100.0F;\r
else if ( voteType.equalsIgnoreCase("day") || voteType.equalsIgnoreCase("night") )\r
required = (float)plugin.getConfig().getInt("vote.time.requiredPercent") / 100.0F;\r
\r
return notImplemented(player);\r
}\r
- else if ( voteCmd.equalsIgnoreCase("sun") || voteCmd.equalsIgnoreCase("rain") || \r
+ else if ( voteCmd.equalsIgnoreCase("sun") || voteCmd.equalsIgnoreCase("rain") || voteCmd.equalsIgnoreCase("storm") ||\r
voteCmd.equalsIgnoreCase("day") || voteCmd.equalsIgnoreCase("night") ) \r
{\r
if ( ! manager.isVoteRunning() )\r
\r
private boolean testPermission (String cmd, String action, Player p)\r
{\r
- if ( ( cmd.equalsIgnoreCase("sun") ) || cmd.equalsIgnoreCase("rain") )\r
+ if ( ( cmd.equalsIgnoreCase("sun") ) || cmd.equalsIgnoreCase("rain") || cmd.equalsIgnoreCase("storm") )\r
{\r
if ( p.hasPermission("vote.weather." + action ) ) return true;\r
else return false;\r