diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java index a07e96477..f9d8c8df4 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java @@ -12,6 +12,7 @@ import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; +import com.intellectualcrafters.plot.util.PlotWeather; import com.intellectualcrafters.plot.util.StringComparison; import com.intellectualcrafters.plot.util.StringMan; import com.plotsquared.general.commands.CommandDeclaration; @@ -168,6 +169,8 @@ public class FlagCmd extends SubCommand { } if(flag == Flags.TIME) { player.setTime(Long.MAX_VALUE); + } else if(flag == Flags.WEATHER) { + player.setWeather(PlotWeather.RESET); } MainUtil.sendMessage(player, C.FLAG_REMOVED); return true; diff --git a/Core/src/main/java/com/plotsquared/listener/PlotListener.java b/Core/src/main/java/com/plotsquared/listener/PlotListener.java index f8a6ed02f..4ea404537 100644 --- a/Core/src/main/java/com/plotsquared/listener/PlotListener.java +++ b/Core/src/main/java/com/plotsquared/listener/PlotListener.java @@ -236,13 +236,11 @@ public class PlotListener { if (plot.getFlag(Flags.TIME).isPresent()) { player.setTime(Long.MAX_VALUE); } - - //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); - + + if (plot.getFlag(Flags.WEATHER).isPresent()) { + player.setTime(Long.MAX_VALUE); + } + Location lastLoc = player.getMeta("music"); if (lastLoc != null) { player.deleteMeta("music");