Always put a sleep and an if conditional after an action:
if (getInventory().contains("Jug of wine") && myPlayer().getHealthPercent() <= 60) {
log("Drinking");
if(getInventory().interact("Drink", "Jug of wine")){
Sleep.sleepUntil(() -> getInventory().contains("Jug"), 2400, 1200);
if (getInventory().contains("Jug")) {
log("Dropping");
if(getInventory().interact("Drop", "Jug")){
Sleep.sleepUntil(() -> (!getInventory().contains("Jug")), 2400, 1200);
}
}
}
}
Get this Sleep with Lambda expressions here: