From c2e48bb95b8e3030fa3a5ebe7f982fe69630cbc4 Mon Sep 17 00:00:00 2001 From: manuelgu Date: Mon, 28 Mar 2016 16:27:27 +0200 Subject: [PATCH] Fixes #1015 --- .../com/intellectualcrafters/plot/commands/SetHome.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/SetHome.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/SetHome.java index 967217167..4f7f5ca69 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/SetHome.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/SetHome.java @@ -44,9 +44,12 @@ public class SetHome extends SetCommand { case "unset": case "remove": case "none": { - plot.getBasePlot(false).setHome(null); - MainUtil.sendMessage(plr, C.POSITION_UNSET); - return true; + Plot base = plot.getBasePlot(false); + Location bot = base.getBottomAbs(); + Location defaultHome = base.getDefaultHome(); + BlockLoc bLoc = new BlockLoc(defaultHome.getX() - bot.getX(), defaultHome.getY(), defaultHome.getZ() - bot.getZ(), defaultHome.getYaw(), defaultHome.getPitch()); + base.setHome(bLoc); + return MainUtil.sendMessage(plr, C.POSITION_UNSET); } case "": { Plot base = plot.getBasePlot(false);