generated from AriasCreations/vsmodtemplate
Admins can now bypass cooldowns
This commit is contained in:
parent
cd00e620c3
commit
700de94ffe
2 changed files with 9 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Vintagestory.API.Client;
|
||||
using Vintagestory.API.Common;
|
||||
using Vintagestory.API.Common.CommandAbbr;
|
||||
|
@ -225,6 +226,12 @@ namespace AriasServerUtils
|
|||
{
|
||||
foreach (var cdEntry in ServerUtilities.mPlayerData)
|
||||
{
|
||||
// Obtain the IServerPlayer instance for this player.
|
||||
IServerPlayer player = API.Server.Players.First(x => x.PlayerName == cdEntry.Key);
|
||||
if (player.HasPrivilege(Privilege.controlserver) && ServerUtilities.config.AdminsBypassCooldowns)
|
||||
{
|
||||
cdEntry.Value.ActiveCooldowns.Clear(); // Problem solved.
|
||||
}
|
||||
List<CooldownType> toRemove = new();
|
||||
foreach (var cd in cdEntry.Value.ActiveCooldowns)
|
||||
{
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"modid": "ariasserverutils",
|
||||
"name": "Aria's Server Utilities",
|
||||
"authors": ["zontreck"],
|
||||
"description": "A collection of server utilities\n\nBuild Date: 03-07-2025 @ 1:44 AM MST",
|
||||
"version": "1.0.6-dev.1",
|
||||
"description": "A collection of server utilities\n\nBuild Date: 03-07-2025 @ 11:49 AM MST",
|
||||
"version": "1.0.6-dev.2",
|
||||
"dependencies": {
|
||||
"game": ""
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue