mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-08 20:09:59 +01:00
Update for latest Velocity changes
This commit is contained in:
parent
8e344cea76
commit
5656bea3f9
@ -33,6 +33,7 @@ import me.lucko.luckperms.common.command.CommandManager;
|
|||||||
import me.lucko.luckperms.common.plugin.LuckPermsPlugin;
|
import me.lucko.luckperms.common.plugin.LuckPermsPlugin;
|
||||||
import me.lucko.luckperms.common.sender.SenderFactory;
|
import me.lucko.luckperms.common.sender.SenderFactory;
|
||||||
import me.lucko.luckperms.common.utils.TextUtils;
|
import me.lucko.luckperms.common.utils.TextUtils;
|
||||||
|
import me.lucko.luckperms.velocity.service.CompatibilityUtil;
|
||||||
|
|
||||||
import net.kyori.text.Component;
|
import net.kyori.text.Component;
|
||||||
|
|
||||||
@ -71,7 +72,7 @@ public class VelocitySenderFactory extends SenderFactory<CommandSource> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Tristate getPermissionValue(CommandSource source, String node) {
|
protected Tristate getPermissionValue(CommandSource source, String node) {
|
||||||
return Tristate.fromBoolean(hasPermission(source, node));
|
return CompatibilityUtil.convertTristate(source.getPermissionValue(node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -82,8 +82,8 @@ public class MonitoringPermissionCheckListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public com.velocitypowered.api.permission.@NonNull Tristate getPermissionSetting(@NonNull String permission) {
|
public com.velocitypowered.api.permission.@NonNull Tristate getPermissionValue(@NonNull String permission) {
|
||||||
com.velocitypowered.api.permission.Tristate setting = this.delegate.getPermissionSetting(permission);
|
com.velocitypowered.api.permission.Tristate setting = this.delegate.getPermissionValue(permission);
|
||||||
|
|
||||||
// report result
|
// report result
|
||||||
Tristate result = CompatibilityUtil.convertTristate(setting);
|
Tristate result = CompatibilityUtil.convertTristate(setting);
|
||||||
|
@ -56,7 +56,7 @@ public class PlayerPermissionProvider implements PermissionProvider, PermissionF
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NonNull Tristate getPermissionSetting(@NonNull String permission) {
|
public @NonNull Tristate getPermissionValue(@NonNull String permission) {
|
||||||
return CompatibilityUtil.convertTristate(this.user.getCachedData().getPermissionData(this.contextsSupplier.getContexts()).getPermissionValue(permission, CheckOrigin.PLATFORM_PERMISSION_CHECK));
|
return CompatibilityUtil.convertTristate(this.user.getCachedData().getPermissionData(this.contextsSupplier.getContexts()).getPermissionValue(permission, CheckOrigin.PLATFORM_PERMISSION_CHECK));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user