mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Oh, and this
This commit is contained in:
parent
638f267498
commit
19ef76de33
@ -21,6 +21,7 @@
|
|||||||
package com.intellectualcrafters.plot.commands;
|
package com.intellectualcrafters.plot.commands;
|
||||||
|
|
||||||
import com.intellectualcrafters.plot.config.C;
|
import com.intellectualcrafters.plot.config.C;
|
||||||
|
import com.intellectualcrafters.plot.object.BlockLoc;
|
||||||
import com.intellectualcrafters.plot.object.Location;
|
import com.intellectualcrafters.plot.object.Location;
|
||||||
import com.intellectualcrafters.plot.object.Plot;
|
import com.intellectualcrafters.plot.object.Plot;
|
||||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||||
@ -48,6 +49,14 @@ public class SetHome extends SetCommand {
|
|||||||
base.setHome(null);
|
base.setHome(null);
|
||||||
return MainUtil.sendMessage(plr, C.POSITION_UNSET);
|
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: {
|
default: {
|
||||||
MainUtil.sendMessage(plr, C.HOME_ARGUMENT);
|
MainUtil.sendMessage(plr, C.HOME_ARGUMENT);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user