mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-12 10:24:43 +02:00
Added IsPlotFlagFalse to FlagManager
This commit is contained in:
@ -116,6 +116,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)
|
||||
* @param plot
|
||||
|
Reference in New Issue
Block a user