From 9413ce088026642a3cb3b9f95255f138fd8a3068 Mon Sep 17 00:00:00 2001 From: Opachl Date: Wed, 15 Nov 2017 11:14:14 +0100 Subject: [PATCH] fix: no wether update after "/p flag remove weather" no wether update after "/p flag remove weather" #1723 --- .../java/com/plotsquared/listener/PlotListener.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/listener/PlotListener.java b/Core/src/main/java/com/plotsquared/listener/PlotListener.java index c1b3479c0..f8a6ed02f 100644 --- a/Core/src/main/java/com/plotsquared/listener/PlotListener.java +++ b/Core/src/main/java/com/plotsquared/listener/PlotListener.java @@ -236,9 +236,13 @@ public class PlotListener { if (plot.getFlag(Flags.TIME).isPresent()) { player.setTime(Long.MAX_VALUE); } - if (plot.getFlag(Flags.WEATHER).isPresent()) { - player.setWeather(PlotWeather.RESET); - } + + //always reset the weather on leave to default + //Flags.WEATHER + //CASE: FLAG SET -> RESET -> Need update to World Weather + //CASE: FLAG NOT SET -> RESET -> Need update to World Weather. We could came from Plot.reEnter() which is used to update flag changes + player.setWeather(PlotWeather.RESET); + Location lastLoc = player.getMeta("music"); if (lastLoc != null) { player.deleteMeta("music");