mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Allow specifying area for move command
This commit is contained in:
parent
79e1ea9a8f
commit
18c92bea38
@ -1,8 +1,10 @@
|
||||
package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.object.Location;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.object.PlotArea;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.Permissions;
|
||||
@ -35,7 +37,10 @@ public class Move extends SubCommand {
|
||||
}
|
||||
Plot plot2 = MainUtil.getPlotFromString(player, args[0], true);
|
||||
if (plot2 == null) {
|
||||
return false;
|
||||
PlotArea area = PS.get().getPlotAreaByString(args[0]);
|
||||
if (area == null)
|
||||
return false;
|
||||
plot2 = area.getPlotAbs(plot1.getId());
|
||||
}
|
||||
if (plot1.equals(plot2)) {
|
||||
MainUtil.sendMessage(player, C.NOT_VALID_PLOT_ID);
|
||||
|
Loading…
Reference in New Issue
Block a user