This commit is contained in:
Luck 2016-10-08 16:45:18 +01:00
parent 7853d4686a
commit 9133951446
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -40,8 +40,9 @@ import java.util.UUID;
public class BukkitUser extends User {
private final LPBukkitPlugin plugin;
private LPPermissible lpPermissible = null;
private final Object permissibleLock = new Object();
@Getter
@Setter
private LPPermissible permissible = null;
@Getter
@Setter
@ -58,19 +59,7 @@ public class BukkitUser extends User {
}
public boolean isOp() {
return lpPermissible != null && lpPermissible.isOp();
}
public LPPermissible getPermissible() {
synchronized (permissibleLock) {
return lpPermissible;
}
}
public void setPermissible(LPPermissible permissible) {
synchronized (permissibleLock) {
lpPermissible = permissible;
}
return permissible != null && permissible.isOp();
}
@SuppressWarnings("unchecked")