diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java index c5de6c164..53951b413 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java @@ -22,7 +22,10 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.*; +import com.intellectualcrafters.plot.database.DBFunc; + import net.milkbowl.vault.economy.Economy; + import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.entity.Player; @@ -120,7 +123,9 @@ public class Auto extends SubCommand { final PlotWorld pw = PlotMain.getWorldSettings(world); final Plot plot2 = PlotMain.getPlots(world).get(plot.id); if ((pw.DEFAULT_FLAGS != null) && (pw.DEFAULT_FLAGS.size() > 0)) { - plot2.settings.setFlags(FlagManager.parseFlags(pw.DEFAULT_FLAGS)); + Flag[] flags = FlagManager.parseFlags(pw.DEFAULT_FLAGS); + plot2.settings.setFlags(flags); + DBFunc.setFlags(plot2.world, plot2, flags); } } Auto.lastPlot = getNextPlot(Auto.lastPlot, 1); @@ -157,7 +162,9 @@ public class Auto extends SubCommand { final PlotWorld pw = PlotMain.getWorldSettings(world); final Plot plot2 = PlotMain.getPlots(world).get(start); if ((pw.DEFAULT_FLAGS != null) && (pw.DEFAULT_FLAGS.size() > 0)) { - plot2.settings.setFlags(FlagManager.parseFlags(pw.DEFAULT_FLAGS)); + Flag[] flags = FlagManager.parseFlags(pw.DEFAULT_FLAGS); + plot2.settings.setFlags(flags); + DBFunc.setFlags(plot2.world, plot2, flags); } } } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java index 100b45b8d..efc12bf8e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java @@ -22,9 +22,12 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.*; +import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.events.PlayerClaimPlotEvent; import com.intellectualcrafters.plot.generator.DefaultPlotWorld; + import net.milkbowl.vault.economy.Economy; + import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -110,7 +113,9 @@ public class Claim extends SubCommand { SchematicHandler.paste(player.getLocation(), sch, plot2, 0, 0); } if ((world.DEFAULT_FLAGS != null) && (world.DEFAULT_FLAGS.size() > 0)) { - plot2.settings.setFlags(FlagManager.parseFlags(world.DEFAULT_FLAGS)); + Flag[] flags = FlagManager.parseFlags(world.DEFAULT_FLAGS); + plot2.settings.setFlags(flags); + DBFunc.setFlags(plot.world, plot2, flags); } if (world instanceof DefaultPlotWorld) { final DefaultPlotWorld pW = (DefaultPlotWorld) world;