if (playerInv.getHelmet() == null || playerInv.getHelmet().getType() != Material.LEATHER_HELMET) {
playerInv.setHelmet(team.getKind().getHat());
}
// 2) Get rid of extra blocks in inventory: only keep one
HashMap<Integer, ? extends ItemStack> blocks = playerInv.all(teamBlockMaterial);
if (blocks.size() > 1 || (blocks.size() == 1 && blocks.get(blocks.keySet().iterator().next()).getAmount() > 1)) {
int i = 0;
int removed = 0;
for (ItemStack item : playerInv.getContents()) {
// remove only same colored wool