Skip to content

Commit 3b5d938

Browse files
authored
Custom ranks (#172)
* First pass at permissions * Update stuff * More rank and permission commands + logic * Final stage of phase 1 for Custom ranks and permissions * haspermission fix
1 parent d387132 commit 3b5d938

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎Essentials/Essentials.csproj‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
3737
</Reference>
3838
<Reference Include="NLog">
39-
<HintPath>..\packages\NLog.4.4.12\lib\net45\NLog.dll</HintPath>
39+
<HintPath>..\..\..\TEST SERVER\NLog.dll</HintPath>
4040
<Private>False</Private>
4141
</Reference>
4242
<Reference Include="PresentationCore" />
@@ -176,4 +176,4 @@
176176
<None Include="packages.config" />
177177
</ItemGroup>
178178
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
179-
</Project>
179+
</Project>

‎Essentials/RanksAndPermissionsModule.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ public bool RankHasPermission(string rank, string cmd, ulong forSteamID) {
165165
}
166166

167167
public void HasCommandPermission(Command command, IMyPlayer player, bool hasPermission, ref bool? hasPermissionOverride) {
168+
if (EssentialsPlugin.Instance.Config.EnableRanks)
169+
return;
170+
168171
string playersRank = PlayerAccountModule.GetRank(player.SteamUserId);
169172
string cmd = "";
170173
foreach (var part in command.Path) {

0 commit comments

Comments
 (0)