Fixes #748
Fixes #759
This commit is contained in:
Jesse Boyd
2015-11-28 22:46:10 +11:00
parent 7db30590c6
commit 94b0fbb266
23 changed files with 445 additions and 140 deletions

View File

@ -120,15 +120,19 @@ public class FlagManager {
}
return false;
}
public static Flag getSettingFlag(final String world, final PlotSettings settings, final String id) {
System.out.print("GETTIGN FLAG!! " + (settings.flags.size() == 0) + " | " + ((settings.flags.get(id)) == null));
Flag flag;
if ((settings.flags.size() == 0) || ((flag = settings.flags.get(id)) == null)) {
final PlotWorld plotworld = PS.get().getPlotWorld(world);
if (plotworld == null) {
System.out.print("pw is nykl");
return null;
}
if (plotworld.DEFAULT_FLAGS.size() == 0) {
System.out.print("no default flags");
return null;
}
System.out.print("DEFAULT_FLAGS: " + plotworld.DEFAULT_FLAGS + " | " + plotworld.DEFAULT_FLAGS.get(id));
return plotworld.DEFAULT_FLAGS.get(id);