mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fixes #1767 (performance issue)
This commit is contained in:
parent
57ae3945d7
commit
4ff02831f3
@ -12,6 +12,7 @@ import com.intellectualcrafters.plot.object.Plot;
|
|||||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||||
import com.intellectualcrafters.plot.util.MainUtil;
|
import com.intellectualcrafters.plot.util.MainUtil;
|
||||||
import com.intellectualcrafters.plot.util.Permissions;
|
import com.intellectualcrafters.plot.util.Permissions;
|
||||||
|
import com.intellectualcrafters.plot.util.PlotWeather;
|
||||||
import com.intellectualcrafters.plot.util.StringComparison;
|
import com.intellectualcrafters.plot.util.StringComparison;
|
||||||
import com.intellectualcrafters.plot.util.StringMan;
|
import com.intellectualcrafters.plot.util.StringMan;
|
||||||
import com.plotsquared.general.commands.CommandDeclaration;
|
import com.plotsquared.general.commands.CommandDeclaration;
|
||||||
@ -168,6 +169,8 @@ public class FlagCmd extends SubCommand {
|
|||||||
}
|
}
|
||||||
if(flag == Flags.TIME) {
|
if(flag == Flags.TIME) {
|
||||||
player.setTime(Long.MAX_VALUE);
|
player.setTime(Long.MAX_VALUE);
|
||||||
|
} else if(flag == Flags.WEATHER) {
|
||||||
|
player.setWeather(PlotWeather.RESET);
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(player, C.FLAG_REMOVED);
|
MainUtil.sendMessage(player, C.FLAG_REMOVED);
|
||||||
return true;
|
return true;
|
||||||
|
@ -236,13 +236,11 @@ public class PlotListener {
|
|||||||
if (plot.getFlag(Flags.TIME).isPresent()) {
|
if (plot.getFlag(Flags.TIME).isPresent()) {
|
||||||
player.setTime(Long.MAX_VALUE);
|
player.setTime(Long.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//always reset the weather on leave to default
|
if (plot.getFlag(Flags.WEATHER).isPresent()) {
|
||||||
//Flags.WEATHER
|
player.setTime(Long.MAX_VALUE);
|
||||||
//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");
|
Location lastLoc = player.getMeta("music");
|
||||||
if (lastLoc != null) {
|
if (lastLoc != null) {
|
||||||
player.deleteMeta("music");
|
player.deleteMeta("music");
|
||||||
|
Loading…
Reference in New Issue
Block a user