mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-08 20:09:59 +01:00
Improve n/bukkit SenderFactory getPermissionValue impls
This commit is contained in:
parent
a33f326cfc
commit
3ceb53aa4f
@ -88,10 +88,13 @@ public class BukkitSenderFactory extends SenderFactory<CommandSender> {
|
||||
|
||||
@Override
|
||||
protected Tristate getPermissionValue(CommandSender sender, String node) {
|
||||
boolean isSet = sender.isPermissionSet(node);
|
||||
boolean val = sender.hasPermission(node);
|
||||
|
||||
return !isSet ? val ? Tristate.TRUE : Tristate.UNDEFINED : Tristate.of(val);
|
||||
if (sender.hasPermission(node)) {
|
||||
return Tristate.TRUE;
|
||||
} else if (sender.isPermissionSet(node)) {
|
||||
return Tristate.FALSE;
|
||||
} else {
|
||||
return Tristate.UNDEFINED;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,10 +80,13 @@ public class NukkitSenderFactory extends SenderFactory<CommandSender> {
|
||||
|
||||
@Override
|
||||
protected Tristate getPermissionValue(CommandSender sender, String node) {
|
||||
boolean isSet = sender.isPermissionSet(node);
|
||||
boolean val = sender.hasPermission(node);
|
||||
|
||||
return !isSet ? val ? Tristate.TRUE : Tristate.UNDEFINED : Tristate.of(val);
|
||||
if (sender.hasPermission(node)) {
|
||||
return Tristate.TRUE;
|
||||
} else if (sender.isPermissionSet(node)) {
|
||||
return Tristate.FALSE;
|
||||
} else {
|
||||
return Tristate.UNDEFINED;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user