If the location is empty, don't try it. If the language string doesn't

exist, then don't try to parse it either and return an empty string.
This commit is contained in:
graywolf336
2013-12-25 22:41:01 -06:00
parent 57e4eb6c1e
commit 6423e8d2e5
2 changed files with 4 additions and 1 deletions

View File

@ -123,6 +123,7 @@ public class Prisoner {
/** Sets the previous location of this player from a comma separated string. */
public void setPreviousPosition(String location) {
if(location == null) return;
if(location.isEmpty()) return;
String[] s = location.split(",");
this.previousPosition = new Location(Bukkit.getWorld(s[0]),