From 1d04d263d7ab599dcfc65cab664761f14b2e9d56 Mon Sep 17 00:00:00 2001 From: HappyPikachu Date: Mon, 16 Apr 2018 16:59:35 -0400 Subject: [PATCH] Stop player data dupe on quit, fixes #368 --- src/main/java/me/blackvein/quests/Quester.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/me/blackvein/quests/Quester.java b/src/main/java/me/blackvein/quests/Quester.java index c661ed1fa..324c9be4d 100644 --- a/src/main/java/me/blackvein/quests/Quester.java +++ b/src/main/java/me/blackvein/quests/Quester.java @@ -2033,7 +2033,7 @@ public class Quester { // Legacy is = new ItemStack(Material.matchMaterial(s), amounts.get(names.indexOf(s)), (short) 0); } - getQuestData(quest).blocksBroken.add(names.indexOf(s), is); + getQuestData(quest).blocksBroken.set(names.indexOf(s), is); } } if (questSec.contains("blocks-damaged-names")) { @@ -2048,7 +2048,7 @@ public class Quester { // Legacy is = new ItemStack(Material.matchMaterial(s), amounts.get(names.indexOf(s)), (short) 0); } - getQuestData(quest).blocksDamaged.add(names.indexOf(s), is); + getQuestData(quest).blocksDamaged.set(names.indexOf(s), is); } } if (questSec.contains("blocks-placed-names")) { @@ -2063,7 +2063,7 @@ public class Quester { // Legacy is = new ItemStack(Material.matchMaterial(s), amounts.get(names.indexOf(s)), (short) 0); } - getQuestData(quest).blocksPlaced.add(names.indexOf(s), is); + getQuestData(quest).blocksPlaced.set(names.indexOf(s), is); } } if (questSec.contains("blocks-used-names")) { @@ -2078,7 +2078,7 @@ public class Quester { // Legacy is = new ItemStack(Material.matchMaterial(s), amounts.get(names.indexOf(s)), (short) 0); } - getQuestData(quest).blocksUsed.add(names.indexOf(s), is); + getQuestData(quest).blocksUsed.set(names.indexOf(s), is); } } if (questSec.contains("blocks-cut-names")) { @@ -2093,7 +2093,7 @@ public class Quester { // Legacy is = new ItemStack(Material.matchMaterial(s), amounts.get(names.indexOf(s)), (short) 0); } - getQuestData(quest).blocksCut.add(names.indexOf(s), is); + getQuestData(quest).blocksCut.set(names.indexOf(s), is); } } if (questSec.contains("fish-caught")) {