mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-07-03 00:38:00 +00:00
Merge pull request #65 from Parabot/feature/friends-list
[FEATURE] Friends list
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,8 +30,6 @@ public interface Client {
|
||||
|
||||
int getBackDialogId();
|
||||
|
||||
int getInputDialogState();
|
||||
|
||||
int getPlane();
|
||||
|
||||
int[] getMenuActionId();
|
||||
@@ -62,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 {
|
||||
|
||||
@@ -77,6 +78,15 @@ public class Game {
|
||||
return Loader.getClient().getPlane();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the friends list long values
|
||||
*
|
||||
* @return long values of friends list
|
||||
*/
|
||||
public static long[] getFriendsListAsLong() {
|
||||
return Loader.getClient().getFriendsListAsLong();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether this client has action 4 hooked
|
||||
*
|
||||
@@ -160,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