api: deprecate getVar(int) and use getVarbitValue(int)

getVarbitValue was originally for external plugins which could not
modify the varbits enum, but now ints are used everywhere it is no
longer necessary for two separate methods
This commit is contained in:
Adam
2022-04-09 23:38:36 -04:00
parent d129c49923
commit 2bc2e867bd
68 changed files with 176 additions and 175 deletions

View File

@@ -778,9 +778,19 @@ public interface Client extends OAuthApi, GameEngine
*
* @param varbit the varbit id
* @return the value
* @see Client#getVarbitValue(int)
*/
@Deprecated
int getVar(@Varbit int varbit);
/**
* Gets a value corresponding to the passed varbit.
*
* @param varbit the varbit id
* @return the value
*/
int getVarbitValue(@Varbit int varbit);
/**
* Gets an int value corresponding to the passed variable.
*
@@ -806,15 +816,6 @@ public interface Client extends OAuthApi, GameEngine
@VisibleForExternalPlugins
int getVarpValue(int varpId);
/**
* Gets the value of a given Varbit.
*
* @param varbitId the varbit id
* @return the value
*/
@VisibleForExternalPlugins
int getVarbitValue(@Varbit int varbitId);
/**
* Gets the value of a given VarClientInt
*

View File

@@ -336,7 +336,7 @@ public class Perspective
Widget minimapDrawWidget;
if (client.isResized())
{
if (client.getVar(Varbits.SIDE_PANELS) == 1)
if (client.getVarbitValue(Varbits.SIDE_PANELS) == 1)
{
minimapDrawWidget = client.getWidget(WidgetInfo.RESIZABLE_MINIMAP_DRAW_AREA);
}