fix index

This commit is contained in:
Jesse Boyd 2016-03-30 12:09:55 +11:00
parent 6ebfd426c3
commit 312ad4c48c
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ import java.util.UUID;
/**
* PlotSquared API.
* <br>
* @version API 3.3.1
* @version API 3.3.2
* <br>
* Useful classes:<br>
* @see BukkitUtil

View File

@ -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()) {