This can be simplified very nicely
RS2Object trapdoor = getObjects().closest("Trapdoor");
if (trapdoor != null && trapdoor.interact("Open", "Climb-down")) {
Sleep.sleepUntil(() -> !trapdoor.exists(), 5000);
}
Once you are in the dungeon, the trapdoor no longer exists, so the sleep condition covers both interactions.