From 0fe407493baa2f2d6a99d82ae7b66ea9aa2cb0a5 Mon Sep 17 00:00:00 2001 From: papershredder432 <34615274+papershredder432@users.noreply.github.com> Date: Mon, 28 Dec 2020 05:04:16 -0500 Subject: [PATCH] Removed unused command, rekt <@492385120771375114> --- .../Commands/Fine/IsFined.cs | 53 ------------------- 1 file changed, 53 deletions(-) delete mode 100644 src/PSRMPoliceUtilities/PSRMPoliceUtilities/Commands/Fine/IsFined.cs diff --git a/src/PSRMPoliceUtilities/PSRMPoliceUtilities/Commands/Fine/IsFined.cs b/src/PSRMPoliceUtilities/PSRMPoliceUtilities/Commands/Fine/IsFined.cs deleted file mode 100644 index 3099103..0000000 --- a/src/PSRMPoliceUtilities/PSRMPoliceUtilities/Commands/Fine/IsFined.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using fr34kyn01535.Uconomy; -using PSRMPoliceUtilities.Models; -using Rocket.API; -using Rocket.Unturned.Player; -using SDG.Unturned; -using UnityEngine; - -namespace PSRMPoliceUtilities.Commands.Fine -{ - public class IsFined : IRocketCommand - { - public void Execute(IRocketPlayer caller, string[] command) - { - UnturnedPlayer unturnedPlayer = (UnturnedPlayer) caller; - - var finedPlayer = UnturnedPlayer.FromName(command[0]); - - if (command.Length < 1) - { - ChatManager.serverSendMessage($"Incorrect usage of command.", Color.red, null, unturnedPlayer.SteamPlayer(), EChatMode.SAY, null, true); - return; - } - - if (finedPlayer == null) - { - ChatManager.serverSendMessage($"Player does not exist.", Color.red, null, unturnedPlayer.SteamPlayer(), EChatMode.SAY, null, true); - return; - } - - int amount = 0; - Models.Fine fine = new Models.Fine(); - if (!PSRMPoliceUtilities.Instance.FinesService.ActiveFine(finedPlayer.CSteamID.ToString(), out fine)) return; - if (fine == null) return; - if (PSRMPoliceUtilities.Instance.FinesService.AmountFines(finedPlayer.CSteamID.ToString(), out amount) > 1) - { - ChatManager.serverSendMessage($"{finedPlayer} has {amount} active fine(s).", Color.blue, null, unturnedPlayer.SteamPlayer(), EChatMode.SAY, null, true); - return; - } - - ChatManager.serverSendMessage($"{finedPlayer} was fined on {fine.FinedDate} for {fine.FinedAmount} {Uconomy.Instance.Configuration.Instance.MoneyName} for {fine.Reason}", Color.blue, null, unturnedPlayer.SteamPlayer(), EChatMode.SAY, null, true); - } - - public AllowedCaller AllowedCaller { get; } - public string Name { get; } - public string Help { get; } - public string Syntax { get; } - public List Aliases { get; } - public List Permissions { get; } - } -} \ No newline at end of file