From 0f7b5a45267a15ae0849c3d215098ce865188ea4 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sun, 12 Oct 2014 01:15:00 -0700 Subject: [PATCH] bugs bugs and more bugs --- .../plot/database/PlotMeConverter.java | 35 +++++++++++++++---- .../plot/generator/DefaultPlotManager.java | 3 +- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/PlotSquared/src/com/intellectualcrafters/plot/database/PlotMeConverter.java b/PlotSquared/src/com/intellectualcrafters/plot/database/PlotMeConverter.java index 905cba147..24b5bd53d 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/database/PlotMeConverter.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/database/PlotMeConverter.java @@ -131,15 +131,38 @@ public class PlotMeConverter { new PlotId(Integer.parseInt(plot.id.split(";")[0]), Integer.parseInt(plot.id.split(";")[1])); com.intellectualcrafters.plot.Plot pl = null; if (online) { - pl = - new com.intellectualcrafters.plot.Plot(id, plot.getOwnerId(), plot.getBiome(), psAdded, psTrusted, psDenied, false, 8000l, false, "", PlotHomePosition.DEFAULT, null, world.getName(), new boolean[] { - false, false, false, false }); + pl = new com.intellectualcrafters.plot.Plot( + id, + plot.getOwnerId(), + plot.getBiome(), + psAdded, psTrusted, + psDenied, + false, + 8000l, + false, + "", + PlotHomePosition.DEFAULT, + null, + world.getName(), + new boolean[] { false, false, false, false }); } else { String owner = plot.getOwner(); - pl = - new com.intellectualcrafters.plot.Plot(id, UUID.nameUUIDFromBytes(("OfflinePlayer:" + owner).getBytes(Charsets.UTF_8)), plot.getBiome(), psAdded, psTrusted, psDenied, false, 8000l, false, "", PlotHomePosition.DEFAULT, null, world.getName(), new boolean[] { - false, false, false, false }); + pl = new com.intellectualcrafters.plot.Plot( + id, + UUID.nameUUIDFromBytes(("OfflinePlayer:" + owner).getBytes(Charsets.UTF_8)), + plot.getBiome(), + psAdded, + psTrusted, + psDenied, + false, + 8000l, + false, + "", + PlotHomePosition.DEFAULT, + null, + world.getName(), + new boolean[] { false, false, false, false }); } // TODO createPlot doesn't add helpers / diff --git a/PlotSquared/src/com/intellectualcrafters/plot/generator/DefaultPlotManager.java b/PlotSquared/src/com/intellectualcrafters/plot/generator/DefaultPlotManager.java index 742e594a2..f319bffe2 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/generator/DefaultPlotManager.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/generator/DefaultPlotManager.java @@ -359,10 +359,11 @@ public class DefaultPlotManager extends PlotManager { @Override public boolean setFloor(Player player, PlotWorld plotworld, PlotId plotid, PlotBlock[] blocks) { + DefaultPlotWorld dpw = (DefaultPlotWorld) plotworld; World world = player.getWorld(); final Location pos1 = PlotHelper.getPlotBottomLoc(world, plotid).add(1, 0, 1); final Location pos2 = PlotHelper.getPlotTopLoc(world, plotid); - PlotHelper.setCuboid(world, pos1, pos2, blocks); + PlotHelper.setCuboid(world, new Location(world,pos1.getX(),dpw.PLOT_HEIGHT,pos1.getZ()), new Location(world,pos2.getX()+1,dpw.PLOT_HEIGHT+1,pos2.getZ()+1), blocks); return true; }