From 19ef76de33a85d886097bc639fafd900b09e6e60 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 29 Mar 2016 18:51:10 +1100 Subject: [PATCH] Oh, and this --- .../com/intellectualcrafters/plot/commands/SetHome.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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 a4896f9a8..ae27e1b5a 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/SetHome.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/SetHome.java @@ -21,6 +21,7 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.object.BlockLoc; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; @@ -48,6 +49,14 @@ public class SetHome extends SetCommand { base.setHome(null); return MainUtil.sendMessage(plr, C.POSITION_UNSET); } + case "": { + Plot base = plot.getBasePlot(false); + Location bot = base.getBottomAbs(); + Location loc = plr.getLocationFull(); + BlockLoc rel = new BlockLoc(loc.getX() - bot.getX(), loc.getY(), loc.getZ() - bot.getZ(), loc.getYaw(), loc.getPitch()); + base.setHome(rel); + return MainUtil.sendMessage(plr, C.POSITION_SET); + } default: { MainUtil.sendMessage(plr, C.HOME_ARGUMENT); return false;