Player player = getPlayer();
if (player == null) return;
if (getTeam() != null)
{
GoalsInventorySnapshot oldCarrying = carrying;
carrying = null; // invalidate old value
carrying = getCarrying();
if (oldCarrying == null)
{ return; }
MapDifference<BlockData, Integer> diff = oldCarrying.getDiff(carrying);
if (!diff.areEqual())
{
for (BlockGoal goal : getTeam().getTeamGoals(BlockGoal.class))
if (goal.getItemStatus() == AutoRefGoal.ItemStatus.NONE && carrying.containsKey(goal.getItem()))