mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Completed and ready to test
This commit is contained in:
@ -4,8 +4,9 @@ import com.intellectualcrafters.configuration.file.YamlConfiguration;
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.commands.SubCommand;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.flag.AbstractFlag;
|
||||
import com.intellectualcrafters.plot.flag.Flag;
|
||||
import com.intellectualcrafters.plot.flag.FlagManager;
|
||||
import com.intellectualcrafters.plot.flag.Flags;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.object.PlotArea;
|
||||
import com.intellectualcrafters.plot.object.PlotId;
|
||||
@ -378,11 +379,9 @@ public class PlotAPI {
|
||||
*
|
||||
* @param flag Flag that should be registered
|
||||
*
|
||||
* @see FlagManager#addFlag(AbstractFlag)
|
||||
* @see AbstractFlag
|
||||
*/
|
||||
public void addFlag(AbstractFlag flag) {
|
||||
FlagManager.addFlag(flag);
|
||||
public void addFlag(Flag<?> flag) {
|
||||
Flags.getFlags().add(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
|
@ -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":
|
||||
|
@ -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()) {
|
||||
|
Reference in New Issue
Block a user