mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Fixed duplicate users potentially being added
This commit is contained in:
parent
96fb8cfab9
commit
6c614d1eec
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user