mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 12:35:15 +01:00
Optional bo3 tags
This commit is contained in:
parent
68df5b1930
commit
8c245b4f21
@ -10,6 +10,7 @@ import java.util.Map.Entry;
|
|||||||
|
|
||||||
import com.intellectualcrafters.plot.PS;
|
import com.intellectualcrafters.plot.PS;
|
||||||
import com.intellectualcrafters.plot.config.Settings;
|
import com.intellectualcrafters.plot.config.Settings;
|
||||||
|
import com.intellectualcrafters.plot.flag.FlagManager;
|
||||||
import com.intellectualcrafters.plot.generator.ClassicPlotWorld;
|
import com.intellectualcrafters.plot.generator.ClassicPlotWorld;
|
||||||
import com.intellectualcrafters.plot.object.BO3;
|
import com.intellectualcrafters.plot.object.BO3;
|
||||||
import com.intellectualcrafters.plot.object.ChunkLoc;
|
import com.intellectualcrafters.plot.object.ChunkLoc;
|
||||||
@ -128,7 +129,7 @@ public class BO3Handler {
|
|||||||
List<String> lines = Files.readAllLines(base.toPath(), StandardCharsets.UTF_8);
|
List<String> lines = Files.readAllLines(base.toPath(), StandardCharsets.UTF_8);
|
||||||
for (int i = 0; i < lines.size(); i++) {
|
for (int i = 0; i < lines.size(); i++) {
|
||||||
String line = lines.get(i).trim();
|
String line = lines.get(i).trim();
|
||||||
String result = StringMan.replaceAll(line, "%owner%", MainUtil.getName(plot.owner), "%alias%", plot.toString(), "%blocks%", bo3.getBlocks(), "%branches%", bo3.getChildren());
|
String result = StringMan.replaceAll(line, "%owner%", MainUtil.getName(plot.owner), "%alias%", plot.toString(), "%blocks%", bo3.getBlocks(), "%branches%", bo3.getChildren(), "%flags%", StringMan.join(FlagManager.getPlotFlags(plot).values(), ","));
|
||||||
if (!StringMan.isEqual(result, line)) {
|
if (!StringMan.isEqual(result, line)) {
|
||||||
lines.set(i, result);
|
lines.set(i, result);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user