mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Saving flags properly
This commit is contained in:
parent
af04881965
commit
278b8bc0c3
@ -22,7 +22,10 @@
|
|||||||
package com.intellectualcrafters.plot.commands;
|
package com.intellectualcrafters.plot.commands;
|
||||||
|
|
||||||
import com.intellectualcrafters.plot.*;
|
import com.intellectualcrafters.plot.*;
|
||||||
|
import com.intellectualcrafters.plot.database.DBFunc;
|
||||||
|
|
||||||
import net.milkbowl.vault.economy.Economy;
|
import net.milkbowl.vault.economy.Economy;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -120,7 +123,9 @@ public class Auto extends SubCommand {
|
|||||||
final PlotWorld pw = PlotMain.getWorldSettings(world);
|
final PlotWorld pw = PlotMain.getWorldSettings(world);
|
||||||
final Plot plot2 = PlotMain.getPlots(world).get(plot.id);
|
final Plot plot2 = PlotMain.getPlots(world).get(plot.id);
|
||||||
if ((pw.DEFAULT_FLAGS != null) && (pw.DEFAULT_FLAGS.size() > 0)) {
|
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);
|
Auto.lastPlot = getNextPlot(Auto.lastPlot, 1);
|
||||||
@ -157,7 +162,9 @@ public class Auto extends SubCommand {
|
|||||||
final PlotWorld pw = PlotMain.getWorldSettings(world);
|
final PlotWorld pw = PlotMain.getWorldSettings(world);
|
||||||
final Plot plot2 = PlotMain.getPlots(world).get(start);
|
final Plot plot2 = PlotMain.getPlots(world).get(start);
|
||||||
if ((pw.DEFAULT_FLAGS != null) && (pw.DEFAULT_FLAGS.size() > 0)) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,9 +22,12 @@
|
|||||||
package com.intellectualcrafters.plot.commands;
|
package com.intellectualcrafters.plot.commands;
|
||||||
|
|
||||||
import com.intellectualcrafters.plot.*;
|
import com.intellectualcrafters.plot.*;
|
||||||
|
import com.intellectualcrafters.plot.database.DBFunc;
|
||||||
import com.intellectualcrafters.plot.events.PlayerClaimPlotEvent;
|
import com.intellectualcrafters.plot.events.PlayerClaimPlotEvent;
|
||||||
import com.intellectualcrafters.plot.generator.DefaultPlotWorld;
|
import com.intellectualcrafters.plot.generator.DefaultPlotWorld;
|
||||||
|
|
||||||
import net.milkbowl.vault.economy.Economy;
|
import net.milkbowl.vault.economy.Economy;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@ -110,7 +113,9 @@ public class Claim extends SubCommand {
|
|||||||
SchematicHandler.paste(player.getLocation(), sch, plot2, 0, 0);
|
SchematicHandler.paste(player.getLocation(), sch, plot2, 0, 0);
|
||||||
}
|
}
|
||||||
if ((world.DEFAULT_FLAGS != null) && (world.DEFAULT_FLAGS.size() > 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) {
|
if (world instanceof DefaultPlotWorld) {
|
||||||
final DefaultPlotWorld pW = (DefaultPlotWorld) world;
|
final DefaultPlotWorld pW = (DefaultPlotWorld) world;
|
||||||
|
Loading…
Reference in New Issue
Block a user