Skip the first line when reading PlayerData files

Thanks @Jikoo
Related to #22
This commit is contained in:
RoboMWM 2016-10-08 10:48:32 -07:00
parent 5d4ccdca20
commit 007a161bfb
2 changed files with 4 additions and 3 deletions

View File

@ -613,8 +613,9 @@ public class FlatFileDataStore extends DataStore
List<String> lines = Files.readLines(playerFile, Charset.forName("UTF-8"));
Iterator<String> iterator = lines.iterator();
iterator.next();
//first line is last login timestamp //RoboMWM - not using this anymore
// String lastLoginTimestampString = iterator.next();
//
// //convert that to a date and store it
// DateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss");

View File

@ -630,7 +630,7 @@ class PlayerEventHandler implements Listener
this.lastLoginThisServerSessionMap.put(playerID, nowDate);
//if newish, prevent chat until he's moved a bit to prove he's not a bot
if(GriefPrevention.isNewToServer(player))
if(instance.isNewToServer(player))
{
playerData.noChatLocation = player.getLocation();
}