From 522ac459dbd6164eccfa77da449b3f4772108b3e Mon Sep 17 00:00:00 2001 From: wizjany Date: Fri, 29 May 2015 02:26:32 -0400 Subject: [PATCH] Fix weather lock flag. Probably. Maybe. Fixes WORLDGUARD-3452. --- .../sk89q/worldguard/session/handler/WeatherLockFlag.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sk89q/worldguard/session/handler/WeatherLockFlag.java b/src/main/java/com/sk89q/worldguard/session/handler/WeatherLockFlag.java index f7c5c112..8984c669 100644 --- a/src/main/java/com/sk89q/worldguard/session/handler/WeatherLockFlag.java +++ b/src/main/java/com/sk89q/worldguard/session/handler/WeatherLockFlag.java @@ -44,7 +44,10 @@ private void updatePlayerWeather(Player player, @Nullable WeatherType value) { @Override protected void onInitialValue(Player player, ApplicableRegionSet set, WeatherType value) { - initialWeather = player.getPlayerWeather(); + if (value == null) { + initialWeather = null; + return; + } updatePlayerWeather(player, value); }