Update for latest Velocity changes

This commit is contained in:
Luck 2018-09-21 21:36:44 +01:00
parent 8e344cea76
commit 5656bea3f9
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
3 changed files with 5 additions and 4 deletions

View File

@ -33,6 +33,7 @@ import me.lucko.luckperms.common.command.CommandManager;
import me.lucko.luckperms.common.plugin.LuckPermsPlugin;
import me.lucko.luckperms.common.sender.SenderFactory;
import me.lucko.luckperms.common.utils.TextUtils;
import me.lucko.luckperms.velocity.service.CompatibilityUtil;
import net.kyori.text.Component;
@ -71,7 +72,7 @@ public class VelocitySenderFactory extends SenderFactory<CommandSource> {
@Override
protected Tristate getPermissionValue(CommandSource source, String node) {
return Tristate.fromBoolean(hasPermission(source, node));
return CompatibilityUtil.convertTristate(source.getPermissionValue(node));
}
@Override

View File

@ -82,8 +82,8 @@ public class MonitoringPermissionCheckListener {
}
@Override
public com.velocitypowered.api.permission.@NonNull Tristate getPermissionSetting(@NonNull String permission) {
com.velocitypowered.api.permission.Tristate setting = this.delegate.getPermissionSetting(permission);
public com.velocitypowered.api.permission.@NonNull Tristate getPermissionValue(@NonNull String permission) {
com.velocitypowered.api.permission.Tristate setting = this.delegate.getPermissionValue(permission);
// report result
Tristate result = CompatibilityUtil.convertTristate(setting);

View File

@ -56,7 +56,7 @@ public class PlayerPermissionProvider implements PermissionProvider, PermissionF
}
@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));
}
}