barrows: fix npe from receiving an empty reward
Co-authored-by: Adam <Adam@sigterm.info>
This commit is contained in:
committed by
Adam
parent
57622f3bad
commit
c7b0023de5
@@ -178,6 +178,11 @@ public class BarrowsPlugin extends Plugin
|
|||||||
if (event.getGroupId() == WidgetID.BARROWS_REWARD_GROUP_ID && config.showChestValue())
|
if (event.getGroupId() == WidgetID.BARROWS_REWARD_GROUP_ID && config.showChestValue())
|
||||||
{
|
{
|
||||||
ItemContainer barrowsRewardContainer = client.getItemContainer(InventoryID.BARROWS_REWARD);
|
ItemContainer barrowsRewardContainer = client.getItemContainer(InventoryID.BARROWS_REWARD);
|
||||||
|
if (barrowsRewardContainer == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Item[] items = barrowsRewardContainer.getItems();
|
Item[] items = barrowsRewardContainer.getItems();
|
||||||
long chestPrice = 0;
|
long chestPrice = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user