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 { public class BukkitUser extends User {
private final LPBukkitPlugin plugin; private final LPBukkitPlugin plugin;
private LPPermissible lpPermissible = null; @Getter
private final Object permissibleLock = new Object(); @Setter
private LPPermissible permissible = null;
@Getter @Getter
@Setter @Setter
@ -58,19 +59,7 @@ public class BukkitUser extends User {
} }
public boolean isOp() { public boolean isOp() {
return lpPermissible != null && lpPermissible.isOp(); return permissible != null && permissible.isOp();
}
public LPPermissible getPermissible() {
synchronized (permissibleLock) {
return lpPermissible;
}
}
public void setPermissible(LPPermissible permissible) {
synchronized (permissibleLock) {
lpPermissible = permissible;
}
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")