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:
@@ -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
|
||||
*
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user