Fixed duplicate users potentially being added

This commit is contained in:
Jesse Boyd 2014-10-18 11:33:48 -07:00
parent 96fb8cfab9
commit 6c614d1eec

View File

@ -219,8 +219,10 @@ public class Plot implements Cloneable {
* @param uuid * @param uuid
*/ */
public void addDenied(UUID uuid) { public void addDenied(UUID uuid) {
if (!denied.contains(uuid)) {
this.denied.add(uuid); this.denied.add(uuid);
} }
}
/** /**
* Add someone as a helper (use DBFunc as well) * Add someone as a helper (use DBFunc as well)
@ -228,8 +230,10 @@ public class Plot implements Cloneable {
* @param uuid * @param uuid
*/ */
public void addHelper(UUID uuid) { public void addHelper(UUID uuid) {
if (!helpers.contains(uuid)) {
this.helpers.add(uuid); this.helpers.add(uuid);
} }
}
/** /**
* Add someone as a trusted user (use DBFunc as well) * Add someone as a trusted user (use DBFunc as well)
@ -237,8 +241,10 @@ public class Plot implements Cloneable {
* @param uuid * @param uuid
*/ */
public void addTrusted(UUID uuid) { public void addTrusted(UUID uuid) {
if (!trusted.contains(uuid)) {
this.trusted.add(uuid); this.trusted.add(uuid);
} }
}
/** /**
* Get plot display name * Get plot display name