JKetelaar
2015-08-27 21:12:44 +02:00
parent fdbc8433ea
commit 0d97513e8d
9 changed files with 178 additions and 25 deletions
+17
View File
@@ -1,5 +1,7 @@
package org.rev317.min.api.methods;
import org.parabot.environment.api.utils.Time;
import org.parabot.environment.scripts.framework.SleepCondition;
import org.rev317.min.Loader;
/**
@@ -113,4 +115,19 @@ public class Game {
return Loader.getClient().isLoggedIn();
}
/**
* Drops the client and returns if the game is logged out or not
* @return True if game is logged out, false if not
*/
public static boolean dropClient(){
Loader.getClient().dropClient();
Time.sleep(new SleepCondition() {
@Override
public boolean isValid() {
return isLoggedIn();
}
}, 2500);
return !isLoggedIn();
}
}