forked from SteamWar/SteamWar
Add PathRegion
This commit is contained in:
+7
-2
@@ -30,6 +30,7 @@ import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.features.util.SelectCommand;
|
||||
import de.steamwar.bausystem.region.Point;
|
||||
import de.steamwar.bausystem.region.Region;
|
||||
import de.steamwar.bausystem.region.RegionHistory;
|
||||
import de.steamwar.bausystem.region.RegionUtils;
|
||||
import de.steamwar.bausystem.region.flags.Flag;
|
||||
import de.steamwar.bausystem.shared.Pair;
|
||||
@@ -71,7 +72,10 @@ public class RegionCommand extends SWCommand {
|
||||
@Register(value = "undo", description = "REGION_REGION_HELP_UNDO")
|
||||
public void undoCommand(@Validator Player p) {
|
||||
Region region = Region.getRegion(p.getLocation());
|
||||
if (checkGlobalRegion(region, p)) return;
|
||||
if (region.getHistory() == RegionHistory.EMPTY) {
|
||||
BauSystem.MESSAGE.send("REGION_REGION_NO_REGION", p);
|
||||
return;
|
||||
}
|
||||
|
||||
if (region.getHistory().undo()) {
|
||||
RegionUtils.message(region, "REGION_REGION_UNDID");
|
||||
@@ -83,7 +87,8 @@ public class RegionCommand extends SWCommand {
|
||||
@Register(value = "redo", description = "REGION_REGION_HELP_REDO")
|
||||
public void redoCommand(@Validator Player p) {
|
||||
Region region = Region.getRegion(p.getLocation());
|
||||
if (checkGlobalRegion(region, p)) {
|
||||
if (region.getHistory() == RegionHistory.EMPTY) {
|
||||
BauSystem.MESSAGE.send("REGION_REGION_NO_REGION", p);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user