> For the complete documentation index, see [llms.txt](https://api.raftmodding.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.raftmodding.com/modding-examples/get-selected-hotbar-item.md).

# Get selected hotbar item

To get the current item that the player has selected we use the `GetSelectedHotbarItem` method from the `PlayerInventory` class.

```csharp
ItemInstance currentItem = RAPI.GetLocalPlayer().Inventory.GetSelectedHotbarItem();
RConsole.Log("Current Item : " + currentItem.settings_Inventory.DisplayName);
```
