barrows: fix npe from receiving an empty reward

Co-authored-by: Adam <Adam@sigterm.info>
This commit is contained in:
Hippolyte Mithouard
2022-02-07 11:19:52 +01:00
committed by Adam
parent 57622f3bad
commit c7b0023de5

View File

@@ -178,6 +178,11 @@ public class BarrowsPlugin extends Plugin
if (event.getGroupId() == WidgetID.BARROWS_REWARD_GROUP_ID && config.showChestValue())
{
ItemContainer barrowsRewardContainer = client.getItemContainer(InventoryID.BARROWS_REWARD);
if (barrowsRewardContainer == null)
{
return;
}
Item[] items = barrowsRewardContainer.getItems();
long chestPrice = 0;