From 312ad4c48c17795a57d59dd29abb339a8e0ff497 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 30 Mar 2016 12:09:55 +1100 Subject: [PATCH] fix index --- .../main/java/com/intellectualcrafters/plot/api/PlotAPI.java | 2 +- Core/src/main/java/com/intellectualcrafters/plot/PS.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Bukkit/src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java b/Bukkit/src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java index d79997b78..6d0b3eeaf 100644 --- a/Bukkit/src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java +++ b/Bukkit/src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java @@ -34,7 +34,7 @@ import java.util.UUID; /** * PlotSquared API. *
- * @version API 3.3.1 + * @version API 3.3.2 *
* Useful classes:
* @see BukkitUtil diff --git a/Core/src/main/java/com/intellectualcrafters/plot/PS.java b/Core/src/main/java/com/intellectualcrafters/plot/PS.java index 3f06189fc..ffd91fa20 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/PS.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/PS.java @@ -1470,7 +1470,7 @@ public class PS { } String name = areaId.substring(0, i1); String rest = areaId.substring(i1 + 1); - int i3 = rest.indexOf("-", i2); + int i3 = rest.indexOf("-", i2 - name.length() - 1); PlotId pos1 = PlotId.fromString(rest.substring(0, i3)); PlotId pos2 = PlotId.fromString(rest.substring(i3 + 1)); if (pos1 == null || pos2 == null || name.isEmpty()) {