git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1520 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
snowleo 2011-05-22 20:06:17 +00:00
parent 7ed87d696a
commit 1c5d9b1db0

View File

@ -18,7 +18,10 @@ public class EssentialsProtectWeatherListener extends WeatherListener
@Override @Override
public void onWeatherChange(WeatherChangeEvent event) public void onWeatherChange(WeatherChangeEvent event)
{ {
if (event.isCancelled()) return; if (event.isCancelled())
{
return;
}
if (EssentialsProtect.playerSettings.get("protect.disable.weather.storm") && event.toWeatherState()) if (EssentialsProtect.playerSettings.get("protect.disable.weather.storm") && event.toWeatherState())
{ {
event.setCancelled(true); event.setCancelled(true);
@ -30,7 +33,10 @@ public class EssentialsProtectWeatherListener extends WeatherListener
@Override @Override
public void onLightningStrike(LightningStrikeEvent event) public void onLightningStrike(LightningStrikeEvent event)
{ {
if (event.isCancelled()) return; if (event.isCancelled())
{
return;
}
if (EssentialsProtect.playerSettings.get("protect.disable.weather.lightning")) if (EssentialsProtect.playerSettings.get("protect.disable.weather.lightning"))
{ {
event.setCancelled(true); event.setCancelled(true);
@ -41,7 +47,10 @@ public class EssentialsProtectWeatherListener extends WeatherListener
@Override @Override
public void onThunderChange(ThunderChangeEvent event) public void onThunderChange(ThunderChangeEvent event)
{ {
if (event.isCancelled()) return; if (event.isCancelled())
{
return;
}
if (EssentialsProtect.playerSettings.get("protect.disable.weather.thunder") && event.toThunderState()) if (EssentialsProtect.playerSettings.get("protect.disable.weather.thunder") && event.toThunderState())
{ {
event.setCancelled(true); event.setCancelled(true);