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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue