Find HitInfo in Method
      Hi everyone, I need to find hitinfo in the method
 
 
object OnDispenserGather (ResourceDispenser dispenser, BaseEntity entity)
        {

            if(!entity.ToPlayer()) return null;
            BasePlayer player = entity as BasePlayer;
            string name = player.displayName;
           
            if(dispenser.gatherType == ResourceDispenser.GatherType.Ore)
            {
                player.ChatMessage(Lang("Ore", player.UserIDString));
                OreConfig ore = _config.FindItemByName("Осколок руды");
                Item items = CreateItem(ore.Name,"seed.pumpkin", ore.Amount);
                player.GiveItem(items);
                return null;
            }
            return null;
        }
 
You need to get such a variable -
BaseEntity ent = info? .HitEntity;

If it isn't passed, it generally isn't available. Oxide only passes what is available and relevant in the method where each hook is injected in the game.