Adding config option for skull (#272)

* Adding config option for skull

* Update TimersConfig.java
This commit is contained in:
Ganom
2019-05-16 18:46:59 -04:00
committed by Kyleeld
parent ac616215c2
commit f5528aa399
2 changed files with 13 additions and 3 deletions

View File

@@ -181,6 +181,16 @@ public interface TimersConfig extends Config
return true; return true;
} }
@ConfigItem(
keyName = "showSkull",
name = "Skull timer",
description = "Configures whether skull timer is displayed"
)
default boolean showSkull()
{
return true;
}
@ConfigItem( @ConfigItem(
keyName = "showStaffOfTheDead", keyName = "showStaffOfTheDead",
name = "Staff of the Dead timer", name = "Staff of the Dead timer",

View File

@@ -44,9 +44,9 @@ import net.runelite.api.NPC;
import net.runelite.api.NpcID; import net.runelite.api.NpcID;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.Prayer; import net.runelite.api.Prayer;
import net.runelite.api.Skill;
import net.runelite.api.SkullIcon; import net.runelite.api.SkullIcon;
import net.runelite.api.VarPlayer; import net.runelite.api.VarPlayer;
import net.runelite.api.Skill;
import net.runelite.api.Varbits; import net.runelite.api.Varbits;
import net.runelite.api.WorldType; import net.runelite.api.WorldType;
import net.runelite.api.coords.WorldPoint; import net.runelite.api.coords.WorldPoint;
@@ -590,7 +590,7 @@ public class TimersPlugin extends Plugin
final boolean isSkulled = player.getSkullIcon() != null && player.getSkullIcon() != SkullIcon.SKULL_FIGHT_PIT; final boolean isSkulled = player.getSkullIcon() != null && player.getSkullIcon() != SkullIcon.SKULL_FIGHT_PIT;
if (isSkulled != skulledLastTick) if (isSkulled != skulledLastTick && config.showSkull())
{ {
skulledLastTick = isSkulled; skulledLastTick = isSkulled;
if (isSkulled) if (isSkulled)
@@ -655,7 +655,7 @@ public class TimersPlugin extends Plugin
if (config.showAbyssalSireStun() if (config.showAbyssalSireStun()
&& actor instanceof NPC) && actor instanceof NPC)
{ {
int npcId = ((NPC)actor).getId(); int npcId = ((NPC) actor).getId();
switch (npcId) switch (npcId)
{ {