diff --git a/runelite-api/src/main/java/net/runelite/api/Client.java b/runelite-api/src/main/java/net/runelite/api/Client.java index 95785bea98..b79a416657 100644 --- a/runelite-api/src/main/java/net/runelite/api/Client.java +++ b/runelite-api/src/main/java/net/runelite/api/Client.java @@ -766,13 +766,22 @@ public interface Client extends OAuthApi, GameEngine int[][] getXteaKeys(); /** - * Gets an array of all client variables. + * Gets an array of all client varplayers. * * @return local player variables */ @VisibleForDevtools int[] getVarps(); + /** + * Get an array of all server varplayers. These vars are only + * modified by the server, and so represent the server's idea of + * the varp values. + * @return the server varps + */ + @VisibleForDevtools + int[] getServerVarps(); + /** * Gets an array of all client variables. */ @@ -787,6 +796,17 @@ public interface Client extends OAuthApi, GameEngine */ int getVar(VarPlayer varPlayer); + /** + * Gets the value corresponding to the passed player variable. + * This returns the server's idea of the value, not the client's. This is + * specifically the last value set by the server regardless of changes to + * the var by the client. + * + * @param varPlayer the player variable + * @return the value + */ + int getServerVar(VarPlayer varPlayer); + /** * Gets a value corresponding to the passed varbit. * @@ -798,13 +818,23 @@ public interface Client extends OAuthApi, GameEngine int getVar(@Varbit int varbit); /** - * Gets a value corresponding to the passed varbit. + * Gets the value of the given varbit. * * @param varbit the varbit id * @return the value */ int getVarbitValue(@Varbit int varbit); + /** + * Gets the value of the given varbit. + * This returns the server's idea of the value, not the client's. This is + * specifically the last value set by the server regardless of changes to + * the var by the client. + * @param varbit the varbit id + * @return the value + */ + int getServerVarbitValue(@Varbit int varbit); + /** * Gets an int value corresponding to the passed variable. * @@ -830,6 +860,18 @@ public interface Client extends OAuthApi, GameEngine @VisibleForExternalPlugins int getVarpValue(int varpId); + /** + * Gets the value of a given VarPlayer. + * This returns the server's idea of the value, not the client's. This is + * specifically the last value set by the server regardless of changes to + * the var by the client. + * + * @param varpId the VarPlayer id + * @return the value + */ + @VisibleForExternalPlugins + int getServerVarpValue(int varpId); + /** * Gets the value of a given VarClientInt *