mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-07-02 16:49:09 +00:00
[FEATURE] Added addFriend and deleteFriend
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.parabot</groupId>
|
||||
<artifactId>317-api-minified</artifactId>
|
||||
<version>1.201</version>
|
||||
<version>1.202</version>
|
||||
<name>Parabot 317-API-Minified</name>
|
||||
|
||||
<licenses>
|
||||
@@ -35,7 +35,7 @@
|
||||
<dependency>
|
||||
<groupId>org.parabot</groupId>
|
||||
<artifactId>client</artifactId>
|
||||
<version>2.6.0</version>
|
||||
<version>2.6.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>*</artifactId>
|
||||
@@ -44,6 +44,11 @@
|
||||
</exclusions>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.parabot</groupId>
|
||||
<artifactId>internal-api</artifactId>
|
||||
<version>1.4.45</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -30,12 +30,8 @@ public interface Client {
|
||||
|
||||
int getBackDialogId();
|
||||
|
||||
int getInputDialogState();
|
||||
|
||||
int getPlane();
|
||||
|
||||
long[] getFriendsListAsLong();
|
||||
|
||||
int[] getMenuActionId();
|
||||
|
||||
int[] getMenuAction1();
|
||||
@@ -64,4 +60,12 @@ public interface Client {
|
||||
int[] getSettings();
|
||||
|
||||
boolean isLoggedIn();
|
||||
|
||||
int getInputDialogState();
|
||||
|
||||
long[] getFriendsListAsLong();
|
||||
|
||||
void addFriend(long id);
|
||||
|
||||
void deleteFriend(long id);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package org.rev317.min.api.methods;
|
||||
|
||||
import org.parabot.api.misc.TextUtils;
|
||||
import org.parabot.environment.api.utils.Time;
|
||||
import org.parabot.environment.scripts.framework.SleepCondition;
|
||||
import org.rev317.min.Loader;
|
||||
|
||||
/**
|
||||
* @author Everel, JKetelaar
|
||||
* @author Everel, JKetelaar, EmmaStone
|
||||
*/
|
||||
public class Game {
|
||||
|
||||
@@ -169,4 +170,20 @@ public class Game {
|
||||
public static void login(String username, String password) {
|
||||
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)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user