<commit_before>﻿namespace Pluton.Rust.Events
{
	using Core;
	using Rust;
	using Rust.Objects;

    public class ItemConditionEvent : CountedInstance
    {
        private InvItem _item;
        private float _amount;

        public Player Player;

        public ItemConditionEvent(Item item, float amount)
        {
            _item = new InvItem(item);
            _amount = amount;
            Player = Server.GetPlayer(item.GetOwnerPlayer());
        }

        public InvItem Item {
            get { return _item; }
        }

        public float Amount {
            get { return _amount; }
        }
    }
}<commit_msg>Fixing Object reference null exceptions on ItemConditionEvent<commit_after>﻿namespace Pluton.Rust.Events
{
	using Core;
	using Rust;
	using Rust.Objects;

    public class ItemConditionEvent : CountedInstance
    {
        private InvItem _item;
        private float _amount;

        public Player Player;

        public ItemConditionEvent(Item item, float amount)
        {
            _item = new InvItem(item);
            _amount = amount;

            BasePlayer ownerPlayer = item.GetOwnerPlayer();

            if (ownerPlayer != null)
            {
                Player = Server.GetPlayer(ownerPlayer);
            }
        }

        public InvItem Item {
            get { return _item; }
        }

        public float Amount {
            get { return _amount; }
        }
    }
}
{'fraction_non_alphanumeric': 0.07137858642407278, 'fraction_numerical': 0.0, 'mean_word_length': 1.723809523809524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3684098', 'n_tokens_mistral': 386, 'n_tokens_neox': 367, 'n_words': 102}