diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java index a522adfe2..289d431f2 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java @@ -20,6 +20,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -75,7 +76,8 @@ public class Set extends SubCommand { } if (args.length < 1) { PlotManager manager = PlotSquared.getPlotManager(loc.getWorld()); - List newValues = Arrays.asList(values);; + ArrayList newValues = new ArrayList(); + newValues.addAll(Arrays.asList(values)); newValues.addAll(Arrays.asList(manager.getPlotComponents(PlotSquared.getPlotWorld(loc.getWorld()), plot.id))); MainUtil.sendMessage(plr, C.SUBCOMMAND_SET_OPTIONS_HEADER.s() + getArgumentList(newValues)); return false; @@ -262,8 +264,9 @@ public class Set extends SubCommand { return true; } } - List newValues = Arrays.asList(values);; - newValues.addAll(Arrays.asList(manager.getPlotComponents(plotworld, plot.id))); + ArrayList newValues = new ArrayList(); + newValues.addAll(Arrays.asList(values)); + newValues.addAll(Arrays.asList(manager.getPlotComponents(PlotSquared.getPlotWorld(loc.getWorld()), plot.id))); MainUtil.sendMessage(plr, C.SUBCOMMAND_SET_OPTIONS_HEADER.s() + getArgumentList(newValues)); return false; } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/ClassicPlotManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/ClassicPlotManager.java index e07479f85..b6d2eabe3 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/ClassicPlotManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/ClassicPlotManager.java @@ -55,7 +55,7 @@ public abstract class ClassicPlotManager extends SquarePlotManager { z = bottom.getZ(); final int length1 = top.getX() - bottom.getX(); final int length2 = top.getZ() - bottom.getZ(); - final int size = length1 * 2 + length2 * 2 * (dpw.WALL_HEIGHT); + final int size = (length1 * 2 + length2 * 2) * (dpw.WALL_HEIGHT); final int[] xl = new int[size]; final int[] yl = new int[size]; final int[] zl = new int[size]; @@ -262,9 +262,10 @@ public abstract class ClassicPlotManager extends SquarePlotManager { @Override public boolean finishPlotMerge(final PlotWorld plotworld, final ArrayList plotIds) { final PlotId pos1 = plotIds.get(0); - final PlotBlock block = ((ClassicPlotWorld) plotworld).WALL_BLOCK; - if (block.id != 0) { - setWall(plotworld, pos1, new PlotBlock[] { ((ClassicPlotWorld) plotworld).WALL_BLOCK }); + final PlotBlock block = ((ClassicPlotWorld) plotworld).CLAIMED_WALL_BLOCK; + final PlotBlock unclaim = ((ClassicPlotWorld) plotworld).WALL_BLOCK; + if (!block.equals(unclaim)) { + setWall(plotworld, pos1, new PlotBlock[] { block }); } return true; } @@ -274,7 +275,7 @@ public abstract class ClassicPlotManager extends SquarePlotManager { final PlotBlock block = ((ClassicPlotWorld) plotworld).CLAIMED_WALL_BLOCK; final PlotBlock unclaim = ((ClassicPlotWorld) plotworld).WALL_BLOCK; for (final PlotId id : plotIds) { - if (block.equals(unclaim)) { + if (!block.equals(unclaim)) { setWall(plotworld, id, new PlotBlock[] { block }); } }