From 232b7ccfc17f3deb3241d9ea5769e7f87a3cadbe Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Mon, 14 Jan 2019 18:15:44 +0000 Subject: [PATCH] Don't allow debugroadregen on merged plots --- .../plotsquared/plot/commands/DebugRoadRegen.java | 2 ++ .../com/github/intellectualsites/plotsquared/plot/config/C.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugRoadRegen.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugRoadRegen.java index 9b7c35c12..84489e88b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugRoadRegen.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugRoadRegen.java @@ -25,6 +25,8 @@ public class DebugRoadRegen extends SubCommand { Plot plot = player.getCurrentPlot(); if (plot == null) { C.NOT_IN_PLOT.send(player); + } else if (plot.isMerged()) { + C.REQUIRES_UNMERGED.send(player); } else { HybridPlotManager manager = (HybridPlotManager) plotArea.getPlotManager(); manager.createRoadEast(plotArea, plot); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/C.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/C.java index 031b99202..d487d883a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/C.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/C.java @@ -184,6 +184,8 @@ public enum C { * Area Create */ + REQUIRES_UNMERGED("$2The plot cannot be merged", "debug"), + SET_ATTRIBUTE("$4Successfully set %s0 set to %s1", "Set"), /* * Web */