Skip to content

Commit

Permalink
Permissions fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xNexusACS committed Dec 3, 2024
1 parent 6049d94 commit c2cee9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Exiled.Loader/AutoUpdateFiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ public static class AutoUpdateFiles
/// <summary>
/// Gets which SCP: SL version generated Exiled.
/// </summary>
public static readonly Version RequiredSCPSLVersion = new(13, 5, 0, 1);
public static readonly Version RequiredSCPSLVersion = new(14, 0, 0, 0);
}
}
12 changes: 3 additions & 9 deletions Exiled.Permissions/Extensions/Permissions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c2cee9f

Please sign in to comment.