public boolean check(RequirementsContext context, List<String> args) throws RequirementCheckException {
boolean outcome = false;
boolean exact = false;
int quantity = 1;
dItem itemToCheck = null;
for (String thisArg : args) {
if (aH.matchesQuantity(thisArg))
quantity = aH.getIntegerFrom(thisArg);
else if(aH.matchesArg("EXACT, EXACTLY, EQUALS", thisArg)) {
exact = true;
}
else itemToCheck = aH.getItemFrom(thisArg);
}
if (itemToCheck != null)
itemToCheck.getItemStack().setAmount(quantity);
if (exact)
outcome = context.getPlayer().getPlayerEntity().getItemInHand().equals(itemToCheck.getItemStack());
else
outcome = context.getPlayer().getPlayerEntity().getItemInHand().isSimilar(itemToCheck.getItemStack());
dB.echoDebug(context.getScriptContainer(), "Outcome: " + ((outcome) ? (exact) ? "Player is holding exact item" : "Player is holding item" : ""));
return outcome;
}