🆕  **What's new and what's changed:**
```diff
+ Added `css_hidecomms` command - Disable showing penalties when player connect
+ Added customizable commands in `Commands.json` file in plugin config directory
  - U can disable command by removing aliases or rename/add more aliases (remember to not remove key, edit only Aliases)
+ Added missing `Console` translation `sa_console`
+ Added `LogCommand` to api
```
This commit is contained in:
Dawid Bepierszcz
2024-09-29 18:29:04 +02:00
parent 702a0315b8
commit 32520c7e84
19 changed files with 361 additions and 207 deletions

View File

@@ -13,32 +13,48 @@ namespace CS2_SimpleAdmin;
public partial class CS2_SimpleAdmin
{
// Paths
internal static string ConfigDirectory = Path.Combine(Application.RootDirectory, "configs/plugins/CS2-SimpleAdmin");
// Localization
public static IStringLocalizer? _localizer;
// Voting System
public static readonly Dictionary<string, int> VoteAnswers = [];
public static bool VoteInProgress;
// Command and Server Settings
public static readonly bool UnlockedCommands = CoreConfig.UnlockConCommands;
internal static string IpAddress = string.Empty;
public static bool ServerLoaded;
public static int? ServerId = null;
internal static readonly HashSet<ulong> AdminDisabledJoinComms = [];
// Player Management
private static readonly HashSet<int> GodPlayers = [];
private static readonly HashSet<int> SilentPlayers = [];
internal static readonly ConcurrentBag<string?> BannedPlayers = [];
internal static readonly Dictionary<ulong, string> RenamedPlayers = [];
public static bool VoteInProgress;
public static int? ServerId = null;
public static readonly bool UnlockedCommands = CoreConfig.UnlockConCommands;
internal static readonly Dictionary<int, PlayerInfo> PlayersInfo = [];
private static readonly List<DisconnectedPlayer> DisconnectedPlayers = [];
// Discord Integration
internal static DiscordWebhookClient? DiscordWebhookClientLog;
// Database Settings
internal string DbConnectionString = string.Empty;
internal static Database.Database? Database;
internal static string IpAddress = string.Empty;
// Logger
internal static ILogger? _logger;
// Memory Function (Game-related)
private static MemoryFunctionVoid<CBasePlayerController, CCSPlayerPawn, bool, bool>? _cBasePlayerControllerSetPawnFunc;
// Menus
// Menu API and Capabilities
internal static IMenuApi? MenuApi;
private static readonly PluginCapability<IMenuApi> MenuCapability = new("menu:nfcore");
// Shared
// Shared API
private Api.CS2_SimpleAdminApi? SimpleAdminApi { get; set; }
}