From e508ac546203a9d4b590ffe3607156662af5636e Mon Sep 17 00:00:00 2001 From: boy0001 Date: Tue, 10 Feb 2015 21:56:04 +1100 Subject: [PATCH] [SOON] New PlotManager hierarchy. --- .../intellectualcrafters/plot/commands/Unclaim.java | 1 + .../plot/generator/ClassicPlotManager.java | 8 ++++++++ .../plot/generator/GridPlotManager.java | 10 ++++++++++ .../plot/generator/HybridPlotManager.java | 2 +- .../plot/generator/SquarePlotManager.java | 8 ++++++++ 5 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/ClassicPlotManager.java create mode 100644 PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/GridPlotManager.java create mode 100644 PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/SquarePlotManager.java diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java index 918a4b78a..a5168d8f8 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java @@ -64,6 +64,7 @@ public class Unclaim extends SubCommand { final boolean result = PlotMain.removePlot(plr.getWorld().getName(), plot.id, true); if (result) { DBFunc.delete(plr.getWorld().getName(), plot); + // TODO set wall block } else { PlayerFunctions.sendMessage(plr, "Plot removal has been denied."); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/ClassicPlotManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/ClassicPlotManager.java new file mode 100644 index 000000000..23d8f7fb3 --- /dev/null +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/ClassicPlotManager.java @@ -0,0 +1,8 @@ +package com.intellectualcrafters.plot.generator; + +/** + * A plot manager with square plots which tesselate on a square grid with the following sections: ROAD, WALL, BORDER (wall), PLOT, FLOOR (plot) + */ +public abstract class ClassicPlotManager extends SquarePlotManager { + +} diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/GridPlotManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/GridPlotManager.java new file mode 100644 index 000000000..a131a1499 --- /dev/null +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/GridPlotManager.java @@ -0,0 +1,10 @@ +package com.intellectualcrafters.plot.generator; + +import com.intellectualcrafters.plot.object.PlotManager; + +/** + * A plot manager where plots tessellate in a grid formation symmetrical about x=z + */ +public abstract class GridPlotManager extends PlotManager { + +} diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotManager.java index a62163d39..55c2d1bb3 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotManager.java @@ -48,7 +48,7 @@ import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.SchematicHandler; import com.intellectualcrafters.plot.util.SendChunk; -@SuppressWarnings("deprecation") public class HybridPlotManager extends PlotManager { +@SuppressWarnings("deprecation") public class HybridPlotManager extends ClassicPlotManager { private int task; private static boolean UPDATE = false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/SquarePlotManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/SquarePlotManager.java new file mode 100644 index 000000000..056ed2ade --- /dev/null +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/SquarePlotManager.java @@ -0,0 +1,8 @@ +package com.intellectualcrafters.plot.generator; + +/** + * A plot manager with a square grid layout, with square shaped plots + */ +public abstract class SquarePlotManager extends GridPlotManager { + +}