@pupu_pot API already has a empty slots method
getInventory().getEmptySlots();
Use ConditionalSleep2 at least over ConditionalSleep if not a custom sleep class.
Empty wall part doesn't actually work I'm pretty sure
// Wait until the amethyst turns into "Empty wall"
new ConditionalSleep(240000, 2000) { // 240,000 milliseconds (4 minutes)
@Override
public boolean condition() throws InterruptedException {
return !amethyst.exists() || amethyst.getName().equals("Empty wall");
}
}.sleep();
Furthermore I recommend not using any AI assistance if you're trying to truly learn coding. If you're just slapping scripts together go for it.