timers plugin: respect enabled configuration
This commit is contained in:
@@ -115,6 +115,12 @@ public class TimersPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void updateConfig(ConfigChanged event)
|
||||
{
|
||||
if (!config.enabled())
|
||||
{
|
||||
infoBoxManager.removeIf(t -> t instanceof TimerTimer);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!config.showStamina())
|
||||
{
|
||||
removeGameTimer(STAMINA);
|
||||
@@ -220,6 +226,11 @@ public class TimersPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onMenuOptionClicked(MenuOptionClicked event)
|
||||
{
|
||||
if (!config.enabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (config.showAntidotePlusPlus()
|
||||
&& event.getMenuOption().contains("Drink")
|
||||
&& (event.getId() == ItemID.ANTIDOTE1_5958
|
||||
@@ -248,6 +259,11 @@ public class TimersPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onChatMessage(ChatMessage event)
|
||||
{
|
||||
if (!config.enabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getType() != ChatMessageType.FILTERED && event.getType() != ChatMessageType.SERVER)
|
||||
{
|
||||
return;
|
||||
@@ -367,6 +383,11 @@ public class TimersPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onGraphicChanged(GraphicChanged event)
|
||||
{
|
||||
if (!config.enabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Actor actor = event.getActor();
|
||||
|
||||
if (actor != client.getLocalPlayer())
|
||||
|
||||
Reference in New Issue
Block a user