if (itemUsed == ITEM_TO_UPGRADE_ID && useWith == ITEM_TO_UPGRADE_ID) {
c.sendMessage("You upgraded...");
c.getItems().deleteItem(ITEM_TO_UPGRADE_ID, 1);
c.getItems().deleteItem(ITEM_TO_UPGRADE_ID, 1);
c.getItems().addItem(UPGRADED_ITEM_ID, 1);
}
For example:
123 and 456 are used together to give 789
if (itemUsed == 123 && useWith == 456) {
c.sendMessage("You upgraded...");
c.getItems().deleteItem(123, 1);
c.getItems().deleteItem(456, 1);
c.getItems().addItem(789, 1);
}