Completed and ready to test

This commit is contained in:
MattBDev
2016-04-21 14:02:49 -04:00
parent aaf9511673
commit 74ed10c376
43 changed files with 578 additions and 1202 deletions

View File

@ -177,17 +177,11 @@ public class LikePlotMeConverter {
Integer pathWidth = plotmeDgYml.getInt("worlds." + plotMeWorldName + ".PathWidth"); //
PS.get().config.set("worlds." + world + ".road.width", pathWidth);
int pathHeight = plotmeDgYml.getInt("worlds." + plotMeWorldName + ".RoadHeight"); //
if (pathHeight == 0) {
pathHeight = 64;
}
int pathHeight = plotmeDgYml.getInt("worlds." + plotMeWorldName + ".RoadHeight", 64); //
PS.get().config.set("worlds." + world + ".road.height", pathHeight);
PS.get().config.set("worlds." + world + ".wall.height", pathHeight);
PS.get().config.set("worlds." + world + ".plot.height", pathHeight);
int plotSize = plotmeDgYml.getInt("worlds." + plotMeWorldName + ".PlotSize", 32); //
if (plotSize == 0) {
plotSize = 32;
}
PS.get().config.set("worlds." + world + ".plot.size", plotSize);
String wallblock = plotmeDgYml.getString("worlds." + plotMeWorldName + ".WallBlock", "44"); //
PS.get().config.set("worlds." + world + ".wall.block", wallblock);
@ -199,10 +193,7 @@ public class LikePlotMeConverter {
PS.get().config.set("worlds." + world + ".road.block", road);
int height = plotmeDgYml.getInt("worlds." + plotMeWorldName + ".RoadHeight"); //
if (height == 0) {
height = plotmeDgYml.getInt("worlds." + plotMeWorldName + ".GroundHeight"); //
if (height == 0) {
height = 64;
}
height = plotmeDgYml.getInt("worlds." + plotMeWorldName + ".GroundHeight", 64); //
}
PS.get().config.set("worlds." + actualWorldName + ".road.height", height);
PS.get().config.set("worlds." + actualWorldName + ".plot.height", height);

View File

@ -5,7 +5,7 @@ import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Settings;
import com.intellectualcrafters.plot.flag.Flags;
import com.intellectualcrafters.plot.flag.NumericFlag;
import com.intellectualcrafters.plot.flag.IntegerFlag;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotArea;
@ -1370,9 +1370,9 @@ public class PlayerEvents extends PlotListener implements Listener {
this.lastRadius = event.getRadius() + 1;
}
public boolean checkEntity(Plot plot, NumericFlag<Integer>... flags) {
public boolean checkEntity(Plot plot, IntegerFlag... flags) {
int[] mobs = null;
for (NumericFlag<Integer> flag : flags) {
for (IntegerFlag flag : flags) {
int i;
switch (flag.getName()) {
case "entity-cap":

View File

@ -101,11 +101,11 @@ public class BukkitSetupUtils extends SetupUtils {
for (ConfigurationNode step : steps) {
worldSection.set(step.getConstant(), step.getValue());
}
PS.get().config.set("worlds." + world + "." + "generator.type", object.type);
PS.get().config.set("worlds." + world + "." + "generator.terrain", object.terrain);
PS.get().config.set("worlds." + world + "." + "generator.plugin", object.plotManager);
PS.get().config.set("worlds." + world + ".generator.type", object.type);
PS.get().config.set("worlds." + world + ".generator.terrain", object.terrain);
PS.get().config.set("worlds." + world + ".generator.plugin", object.plotManager);
if (object.setupGenerator != null && !object.setupGenerator.equals(object.plotManager)) {
PS.get().config.set("worlds." + world + "." + "generator.init", object.setupGenerator);
PS.get().config.set("worlds." + world + ".generator.init", object.setupGenerator);
}
GeneratorWrapper<?> gen = SetupUtils.generators.get(object.setupGenerator);
if (gen != null && gen.isFull()) {