[FEATURE] Added addFriend and deleteFriend

This commit is contained in:
Emmastone
2016-11-17 17:47:43 +00:00
parent 650ae39acb
commit 9129171880
3 changed files with 33 additions and 7 deletions
+7 -2
View File
@@ -6,7 +6,7 @@
<groupId>org.parabot</groupId> <groupId>org.parabot</groupId>
<artifactId>317-api-minified</artifactId> <artifactId>317-api-minified</artifactId>
<version>1.201</version> <version>1.202</version>
<name>Parabot 317-API-Minified</name> <name>Parabot 317-API-Minified</name>
<licenses> <licenses>
@@ -35,7 +35,7 @@
<dependency> <dependency>
<groupId>org.parabot</groupId> <groupId>org.parabot</groupId>
<artifactId>client</artifactId> <artifactId>client</artifactId>
<version>2.6.0</version> <version>2.6.1</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>*</artifactId> <artifactId>*</artifactId>
@@ -44,6 +44,11 @@
</exclusions> </exclusions>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.parabot</groupId>
<artifactId>internal-api</artifactId>
<version>1.4.45</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
@@ -30,12 +30,8 @@ public interface Client {
int getBackDialogId(); int getBackDialogId();
int getInputDialogState();
int getPlane(); int getPlane();
long[] getFriendsListAsLong();
int[] getMenuActionId(); int[] getMenuActionId();
int[] getMenuAction1(); int[] getMenuAction1();
@@ -64,4 +60,12 @@ public interface Client {
int[] getSettings(); int[] getSettings();
boolean isLoggedIn(); boolean isLoggedIn();
int getInputDialogState();
long[] getFriendsListAsLong();
void addFriend(long id);
void deleteFriend(long id);
} }
@@ -1,11 +1,12 @@
package org.rev317.min.api.methods; package org.rev317.min.api.methods;
import org.parabot.api.misc.TextUtils;
import org.parabot.environment.api.utils.Time; import org.parabot.environment.api.utils.Time;
import org.parabot.environment.scripts.framework.SleepCondition; import org.parabot.environment.scripts.framework.SleepCondition;
import org.rev317.min.Loader; import org.rev317.min.Loader;
/** /**
* @author Everel, JKetelaar * @author Everel, JKetelaar, EmmaStone
*/ */
public class Game { public class Game {
@@ -169,4 +170,20 @@ public class Game {
public static void login(String username, String password) { public static void login(String username, String password) {
login(username, password, false); login(username, password, false);
} }
/**
* Adds friend
* @param username String
*/
public static void addFriend(String username) {
Loader.getClient().addFriend(TextUtils.longForName(TextUtils.fixName(username)));
}
/**
* Deletes friend
* @param username String
*/
public static void deleteFriend(String username) {
Loader.getClient().deleteFriend(TextUtils.longForName(TextUtils.fixName(username)));
}
} }