mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Saving flags properly
This commit is contained in:
parent
af04881965
commit
278b8bc0c3
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user