From fe473ebcb817dfd9f2431cfb77adebada43afc91 Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Mon, 15 Sep 2014 20:13:17 -0700 Subject: [PATCH] Finished back compat with buggy beta versions. Now claim and player data that were written by beta versions will be automatically carried forward and used by newer stable versions. --- .../GriefPrevention/FlatFileDataStore.java | 13 ++++++++++--- .../GriefPrevention/PlayerEventHandler.java | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java b/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java index 9d6ed6c..d1b1b1e 100644 --- a/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java +++ b/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java @@ -159,10 +159,17 @@ public class FlatFileDataStore extends DataStore while(line != null) { - //Let's skip the UUID lines from previous versions + //skip any SUB:### lines from previous versions + if(line.startsWith("SUB:")) + { + line = inStream.readLine(); + } + + //skip any UUID lines from previous versions Matcher match = uuidpattern.matcher(line.trim()); - if(match.find()) { - inStream.readLine(); + if(match.find()) + { + line = inStream.readLine(); } //first line is lesser boundary corner location diff --git a/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java b/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java index 60e5711..ca963ee 100644 --- a/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java +++ b/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java @@ -1210,7 +1210,7 @@ class PlayerEventHandler implements Listener return; } - //if he's investigating a claim + //if he's investigating a claim else if(materialInHand == GriefPrevention.instance.config_claims_investigationTool) { //air indicates too far away