From 6c614d1eec676084d6980c45d70cc56345b9e2e2 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sat, 18 Oct 2014 11:33:48 -0700 Subject: [PATCH] Fixed duplicate users potentially being added --- .../src/com/intellectualcrafters/plot/Plot.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/PlotSquared/src/com/intellectualcrafters/plot/Plot.java b/PlotSquared/src/com/intellectualcrafters/plot/Plot.java index 3e5825735..47d064cb6 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/Plot.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/Plot.java @@ -219,7 +219,9 @@ public class Plot implements Cloneable { * @param uuid */ public void addDenied(UUID uuid) { - this.denied.add(uuid); + if (!denied.contains(uuid)) { + this.denied.add(uuid); + } } /** @@ -228,7 +230,9 @@ public class Plot implements Cloneable { * @param uuid */ public void addHelper(UUID uuid) { - this.helpers.add(uuid); + if (!helpers.contains(uuid)) { + this.helpers.add(uuid); + } } /** @@ -237,7 +241,9 @@ public class Plot implements Cloneable { * @param uuid */ public void addTrusted(UUID uuid) { - this.trusted.add(uuid); + if (!trusted.contains(uuid)) { + this.trusted.add(uuid); + } } /**