wiki: only show vanilla wiki banner when enabled (#13380)

This commit is contained in:
superiorser9
2021-03-29 01:08:04 +01:00
committed by GitHub
parent 38fbcb39d6
commit d27cefaeeb
2 changed files with 11 additions and 1 deletions

View File

@@ -589,6 +589,15 @@ public enum Varbits
*/
PARASITE(10151),
/**
* Whether the vanilla wiki entity lookup is displayed under the minimap
*
* 0 = Enabled
* 1 = Disabled
*
*/
WIKI_ENTITY_LOOKUP(10113),
/**
* Whether the Special Attack orb is disabled due to being in a PvP area
*

View File

@@ -38,6 +38,7 @@ import net.runelite.api.NPCComposition;
import net.runelite.api.ObjectComposition;
import net.runelite.api.ScriptID;
import net.runelite.api.SpriteID;
import net.runelite.api.Varbits;
import net.runelite.api.coords.WorldPoint;
import net.runelite.api.events.MenuEntryAdded;
import net.runelite.api.events.MenuOptionClicked;
@@ -131,7 +132,7 @@ public class WikiPlugin extends Plugin
children[0] = null;
Widget vanilla = client.getWidget(WidgetInfo.MINIMAP_WIKI_BANNER);
if (vanilla != null)
if (vanilla != null && client.getVar(Varbits.WIKI_ENTITY_LOOKUP) == 0)
{
vanilla.setHidden(false);
}