From c2cee9f07d9be4aa92f6de3f096cd9cb8dfa5c2f Mon Sep 17 00:00:00 2001 From: xNexusACS <83370388+xNexusACS@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:10:04 +0100 Subject: [PATCH] Permissions fix --- Exiled.Loader/AutoUpdateFiles.cs | 2 +- Exiled.Permissions/Extensions/Permissions.cs | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Exiled.Loader/AutoUpdateFiles.cs b/Exiled.Loader/AutoUpdateFiles.cs index c083b2eb6e..be1f08fc74 100644 --- a/Exiled.Loader/AutoUpdateFiles.cs +++ b/Exiled.Loader/AutoUpdateFiles.cs @@ -17,6 +17,6 @@ public static class AutoUpdateFiles /// /// Gets which SCP: SL version generated Exiled. /// - public static readonly Version RequiredSCPSLVersion = new(13, 5, 0, 1); + public static readonly Version RequiredSCPSLVersion = new(14, 0, 0, 0); } } \ No newline at end of file diff --git a/Exiled.Permissions/Extensions/Permissions.cs b/Exiled.Permissions/Extensions/Permissions.cs index d8860ab527..58e5ac0544 100644 --- a/Exiled.Permissions/Extensions/Permissions.cs +++ b/Exiled.Permissions/Extensions/Permissions.cs @@ -14,16 +14,13 @@ namespace Exiled.Permissions.Extensions using System.Text; using CommandSystem; - using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.API.Features.Core.Generic.Pools; using Features; - using Properties; - + using Query; using RemoteAdmin; - using YamlDotNet.Core; using YamlDotNet.Serialization; using YamlDotNet.Serialization.NamingConventions; @@ -183,12 +180,9 @@ public static bool CheckPermission(this CommandSender sender, string permission) { return true; } - else if (sender is PlayerCommandSender || sender is UserPrint) + else if (sender is PlayerCommandSender || sender is QueryCommandSender) { - if (Player.Get(sender.SenderId) is not Player player) - return false; - - return player.CheckPermission(permission); + return Player.Get(sender.SenderId) is Player player && player.CheckPermission(permission); } return false;