Added IsPlotFlagFalse to FlagManager

This commit is contained in:
boy0001 2015-04-15 17:42:28 +10:00
parent 5245177d9d
commit be8db522fd

View File

@ -115,6 +115,17 @@ public class FlagManager {
}
return false;
}
public static boolean isPlotFlagFalse(final Plot plot, final String strFlag) {
final Flag flag = getPlotFlag(plot, strFlag);
if (flag == null) {
return false;
}
if (flag.getValue() instanceof Boolean) {
return !(boolean) flag.getValue();
}
return false;
}
/**
* Get the value of a flag for a plot (ignores flag defaults)