private bool VerifyOffCooldown(IPlayer player)
        {
            var secondsRemaining = CraftCooldowns.GetSecondsRemaining(player.Id);

            if (secondsRemaining <= 0)
            {
                return(true);
            }
            ReplyToPlayer(player, "Error.Cooldown", Math.Ceiling(secondsRemaining));
            return(false);
        }
Ejemplo n.º 2
0
        private bool VerifyOffCooldown(IPlayer player)
        {
            if (player.HasPermission(Permission_NoClaimCooldown))
            {
                return(true);
            }

            var basePlayer       = player.Object as BasePlayer;
            var secondsRemaining = ClaimCooldowns.GetSecondsRemaining(basePlayer.userID);

            if (secondsRemaining > 0)
            {
                ReplyToPlayer(player, "Generic.Error.Cooldown", FormatDuration(secondsRemaining));
                return(false);
            }

            return(true);
        }