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
1 changed files with 15 additions and 6 deletions

View File

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