|
@@ -24,9 +24,12 @@ public class PlotCommands {
|
|
|
PlotMap.Plot p = (PlotMap.Plot) in[0].get(sc);
|
|
|
p.setFlag(in[1].getInt(sc), in[2].getBoolean(sc));
|
|
|
});
|
|
|
- sm.registerFunction("plot.hasflags", (sc, in) -> ((PlotMap.Plot) in[0].get(sc)).hasFlags(in[1].getInt(sc)));
|
|
|
- sm.registerFunction("plot.getflags", (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getFlags());
|
|
|
- sm.registerFunction("plot.getowners", (sc, in) -> ((PlotMap.Plot) in[0].get(sc)).getOwners());
|
|
|
+ sm.registerFunction("plot.hasflags",
|
|
|
+ (sc, in) -> ((PlotMap.Plot) in[0].get(sc)).hasFlags(in[1].getInt(sc)));
|
|
|
+ sm.registerFunction("plot.getflags",
|
|
|
+ (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getFlags());
|
|
|
+ sm.registerFunction("plot.getowners",
|
|
|
+ (sc, in) -> ((PlotMap.Plot) in[0].get(sc)).getOwners());
|
|
|
sm.registerFunction("plot.add", (sc, in) -> {
|
|
|
Location l1 = (Location) in[0].get(sc);
|
|
|
Location l2 = (Location) in[1].get(sc);
|
|
@@ -42,22 +45,30 @@ public class PlotCommands {
|
|
|
sm.registerConsumer("plot.setname", (sc, in) -> {
|
|
|
((PlotMap.Plot) in[0].get(sc)).setName(in[1].getString(sc));
|
|
|
});
|
|
|
- sm.registerFunction("plot.getid", (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getId());
|
|
|
+ sm.registerFunction("plot.getid",
|
|
|
+ (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getId());
|
|
|
sm.registerFunction("plot.iterator", (sc, in) -> {
|
|
|
World word = (World) in[0].get(sc);
|
|
|
if(in.length >= 2) {
|
|
|
- plots.getIterator(word, CommandUtils.getUUID(in[1].get(sc)));
|
|
|
+ return plots.getIterator(word, CommandUtils.getUUID(in[1].get(sc)));
|
|
|
}
|
|
|
return plots.getIterator(word);
|
|
|
});
|
|
|
- sm.registerFunction("plot.intersecting", (sc, in) -> plots.getIntersectingPlots((World) in[0].get(sc), in[1].getInt(sc),
|
|
|
- in[2].getInt(sc), in[3].getInt(sc), in[4].getInt(sc),
|
|
|
- in[5].getInt(sc), in[6].getInt(sc)));
|
|
|
- sm.registerFunction("plot.getminx", (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getMinX());
|
|
|
- sm.registerFunction("plot.getminy", (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getMinY());
|
|
|
- sm.registerFunction("plot.getminz", (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getMinZ());
|
|
|
- sm.registerFunction("plot.getmaxx", (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getMaxX());
|
|
|
- sm.registerFunction("plot.getmaxy", (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getMaxY());
|
|
|
- sm.registerFunction("plot.getmaxz", (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getMaxZ());
|
|
|
+ sm.registerFunction("plot.intersecting",
|
|
|
+ (sc, in) -> plots.getIntersectingPlots((World) in[0].get(sc), in[1].getInt(sc),
|
|
|
+ in[2].getInt(sc), in[3].getInt(sc), in[4].getInt(sc), in[5].getInt(sc),
|
|
|
+ in[6].getInt(sc)));
|
|
|
+ sm.registerFunction("plot.getminx",
|
|
|
+ (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getMinX());
|
|
|
+ sm.registerFunction("plot.getminy",
|
|
|
+ (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getMinY());
|
|
|
+ sm.registerFunction("plot.getminz",
|
|
|
+ (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getMinZ());
|
|
|
+ sm.registerFunction("plot.getmaxx",
|
|
|
+ (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getMaxX());
|
|
|
+ sm.registerFunction("plot.getmaxy",
|
|
|
+ (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getMaxY());
|
|
|
+ sm.registerFunction("plot.getmaxz",
|
|
|
+ (sc, in) -> (double) ((PlotMap.Plot) in[0].get(sc)).getMaxZ());
|
|
|
}
|
|
|
}
|