Hello so i have problem with worldhopping
(I'm not good at conditional sleep so please help me to solve it )
if(store.isOpen()) {
Item test1 = getStore().getItem("Item");
if (test1 != null && getStore().getAmount("Item") > 0) {
getStore().buy("Item", 5);
}
}
Item test2 = getStore().getItem("Item2");
if (test2 != null && getStore().getAmount("Item2") > 0) {
getStore().buy("Item2", 5);
}
if (getStore().isOpen()) {
getStore().close();
new ConditionalSleep(5500, 6000) {
public boolean condition() throws InterruptedException {
return !getStore().isOpen();
}
}.sleep();
getWorlds().hopToP2PWorld();
new ConditionalSleep(15000, 25000) {
public boolean condition() throws InterruptedException {
return myPlayer().exists();
}
}.sleep();
}
}
}
The problem is after world hop it starts to eat all my cpu.So if sombody could help me that would be great