IDK if this is properly done, it does work - but done correctly?
Code:
public static int[] VOID_SET = {8839, 8840, 8842};
public static int RANGER_HELM = 11664;
public static int MELEE_HELM = 11665;
public static int MAGE_HELM = 11663;
/**
* Does the player have a full void set?
* @param player person that is checked
* @param set identifies the set number (1 for melee, 2 for range, 3 for mage)
* @return true or false
* @author Canownueasy
* @author Harry
*/
public static boolean hasVoidSet(Player player, final int set) {
int HELM = 0;
if(player.getEquipment().contains(VOID_SET.length)) { //Does the player have the set?
switch(set) {
case 1: //Melee
HELM = MELEE_HELM;
break;
case 2: //Range
HELM = RANGER_HELM;
break;
case 3: //Mage
HELM = MAGE_HELM;
break;
}
if(player.getEquipment().contains(HELM)) { //If they have the helm, they have full void
return true;
} else {
return false;
}
} else {
return false;
}
}