Remove enabled() checks

- Remove all configurations that contained only enabled()
- Remove enabled() from all remaining configurations
- Remove all checks for enabled()

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-01-15 17:57:42 +01:00
parent c3fae86356
commit 36c4ab3c15
103 changed files with 174 additions and 1483 deletions

View File

@@ -44,26 +44,19 @@ public class AgilityOverlay extends Overlay
private final Client client;
private final AgilityPlugin plugin;
private final AgilityPluginConfiguration config;
@Inject
public AgilityOverlay(@Nullable Client client, AgilityPlugin plugin, AgilityPluginConfiguration config)
public AgilityOverlay(@Nullable Client client, AgilityPlugin plugin)
{
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ABOVE_SCENE);
this.client = client;
this.plugin = plugin;
this.config = config;
}
@Override
public Dimension render(Graphics2D graphics, java.awt.Point parent)
{
if (!config.enabled())
{
return null;
}
Point playerLocation = client.getLocalPlayer().getLocalLocation();
Point mousePosition = client.getMouseCanvasPosition();
plugin.getObstacles().forEach((object, tile) ->

View File

@@ -26,7 +26,6 @@ package net.runelite.client.plugins.agilityplugin;
import com.google.common.eventbus.Subscribe;
import com.google.inject.Binder;
import com.google.inject.Provides;
import java.util.HashMap;
import javax.inject.Inject;
import lombok.Getter;
@@ -47,7 +46,6 @@ import net.runelite.api.events.GroundObjectSpawned;
import net.runelite.api.events.WallObjectChanged;
import net.runelite.api.events.WallObjectDespawned;
import net.runelite.api.events.WallObjectSpawned;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
@@ -64,12 +62,6 @@ public class AgilityPlugin extends Plugin
@Getter
private AgilityOverlay overlay;
@Provides
AgilityPluginConfiguration getConfig(ConfigManager configManager)
{
return configManager.getConfig(AgilityPluginConfiguration.class);
}
@Override
public void configure(Binder binder)
{

View File

@@ -1,48 +0,0 @@
/*
* Copyright (c) 2018, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.agilityplugin;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup(
keyName = "agilityplugin",
name = "Agility plugin",
description = "Configuration for the agility plugin"
)
public interface AgilityPluginConfiguration extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable overlay",
description = "Configures whether the overlay is enabled"
)
default boolean enabled()
{
return true;
}
}

View File

@@ -35,17 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface AttackIndicatorConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Show attack style",
description = "Configures whether or not the attack indicator overlay is displayed",
position = 1
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "warnForDefensive",
name = "Warn for defensive",

View File

@@ -37,26 +37,19 @@ public class AttackIndicatorOverlay extends Overlay
{
private static final int COMPONENT_WIDTH = 80;
private final AttackIndicatorConfig config;
private final AttackIndicatorPlugin plugin;
private final PanelComponent panelComponent = new PanelComponent();
@Inject
public AttackIndicatorOverlay(AttackIndicatorPlugin plugin, AttackIndicatorConfig config)
public AttackIndicatorOverlay(AttackIndicatorPlugin plugin)
{
setPosition(OverlayPosition.ABOVE_CHATBOX_RIGHT);
this.plugin = plugin;
this.config = config;
}
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled())
{
return null;
}
final String attackStyleString = plugin.getAttackStyle().getName();
panelComponent.setTitleColor(plugin.isWarnedSkillSelected() ? Color.RED : Color.WHITE);

View File

@@ -24,6 +24,11 @@
*/
package net.runelite.client.plugins.attackindicator;
import static net.runelite.api.widgets.WidgetID.COMBAT_GROUP_ID;
import static net.runelite.api.widgets.WidgetInfo.TO_GROUP;
import static net.runelite.client.plugins.attackindicator.AttackStyle.CASTING;
import static net.runelite.client.plugins.attackindicator.AttackStyle.DEFENSIVE_CASTING;
import static net.runelite.client.plugins.attackindicator.AttackStyle.OTHER;
import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table;
import com.google.common.eventbus.Subscribe;
@@ -42,13 +47,10 @@ import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.VarbitChanged;
import net.runelite.api.events.WidgetHiddenChanged;
import net.runelite.api.widgets.Widget;
import static net.runelite.api.widgets.WidgetID.COMBAT_GROUP_ID;
import net.runelite.api.widgets.WidgetInfo;
import static net.runelite.api.widgets.WidgetInfo.TO_GROUP;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import static net.runelite.client.plugins.attackindicator.AttackStyle.*;
@PluginDescriptor(
name = "Attack indicator plugin"
@@ -201,8 +203,6 @@ public class AttackIndicatorPlugin extends Plugin
boolean enabled = event.getNewValue().equals("true");
switch (event.getKey())
{
case "enabled":
break;
case "warnForDefensive":
updateWarnedSkills(enabled, Skill.DEFENCE);
break;
@@ -221,8 +221,6 @@ public class AttackIndicatorPlugin extends Plugin
case "removeWarnedStyles":
hideWarnedStyles(enabled);
break;
default:
log.warn("Unreachable default case for config keys");
}
}
}

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface BarbarianAssaultConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable plugin",
description = "Configures whether or not the plugin is enabled"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "removeUnused",
name = "Remove incorrect calls",

View File

@@ -62,7 +62,7 @@ public class BarbarianAssaultOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled() || client.getGameState() != GameState.LOGGED_IN || currentRound == null)
if (client.getGameState() != GameState.LOGGED_IN || currentRound == null)
{
return null;
}

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface BarrowsConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not the Barrows plugin is displayed"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "showMinimap",
name = "Show Minimap in tunnels",

View File

@@ -62,11 +62,6 @@ class BarrowsOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled())
{
return null;
}
Player local = client.getLocalPlayer();
// tunnels are only on z=0

View File

@@ -41,16 +41,14 @@ class BlastFurnaceCofferOverlay extends Overlay
{
private final Client client;
private final BlastFurnacePlugin plugin;
private final BlastFurnaceConfig config;
private final PanelComponent panelComponent = new PanelComponent();
@Inject
BlastFurnaceCofferOverlay(Client client, BlastFurnacePlugin plugin, BlastFurnaceConfig config)
BlastFurnaceCofferOverlay(Client client, BlastFurnacePlugin plugin)
{
setPosition(OverlayPosition.TOP_LEFT);
this.client = client;
this.plugin = plugin;
this.config = config;
}
@Override

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface BlastFurnaceConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable",
description = "Configures whether to enable the blast furnace plugin"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "showConveyorBelt",
name = "Show Conveyor belt clickbox",

View File

@@ -39,25 +39,23 @@ class BlastFurnaceOverlay extends Overlay
{
private final Client client;
private final BlastFurnacePlugin plugin;
private final BlastFurnaceConfig config;
private final ImagePanelComponent imagePanelComponent = new ImagePanelComponent();
@Inject
private ItemManager itemManager;
@Inject
BlastFurnaceOverlay(Client client, BlastFurnacePlugin plugin, BlastFurnaceConfig config)
BlastFurnaceOverlay(Client client, BlastFurnacePlugin plugin)
{
setPosition(OverlayPosition.TOP_LEFT);
this.plugin = plugin;
this.client = client;
this.config = config;
}
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled() || plugin.getConveyorBelt() == null)
if (plugin.getConveyorBelt() == null)
{
return null;
}

View File

@@ -55,7 +55,7 @@ class ConveyorBeltOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, java.awt.Point parent)
{
if (!config.enabled() || !config.showConveyorBelt() || plugin.getConveyorBelt() == null)
if (!config.showConveyorBelt() || plugin.getConveyorBelt() == null)
{
return null;
}

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.Config;
)
public interface BoostsConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not boost info is displayed"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "enableSkill",
name = "Enable Skill Boosts",

View File

@@ -72,11 +72,6 @@ class BoostsOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled())
{
return null;
}
panelComponent = new PanelComponent();
for (Skill skill : plugin.getShownSkills())

View File

@@ -88,10 +88,7 @@ public class BoostsPlugin extends Plugin
@Override
protected void startUp()
{
if (config.enabled())
{
updateShownSkills(config.enableSkill());
}
updateShownSkills(config.enableSkill());
}
@Override
@@ -103,12 +100,6 @@ public class BoostsPlugin extends Plugin
@Subscribe
public void onConfigChanged(ConfigChanged event)
{
if (!config.enabled())
{
infoBoxManager.removeIf(t -> t instanceof BoostIndicator);
return;
}
updateShownSkills(config.enableSkill());
infoBoxManager.removeIf(t -> t instanceof BoostIndicator

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface CannonConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not the Cannon plugin is displayed"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "showEmptyCannonNotification",
name = "Empty cannon notification",

View File

@@ -59,7 +59,7 @@ class CannonOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!plugin.cannonPlaced || plugin.myCannon == null || !config.enabled())
if (!plugin.cannonPlaced || plugin.myCannon == null)
{
return null;
}

View File

@@ -1,47 +0,0 @@
/*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.clanchat;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup(
keyName = "clanchat",
name = "Clan Chat",
description = "Configuration for clan chat"
)
public interface ClanChatConfig extends Config
{
@ConfigItem(
keyName = "clanRank",
name = "Show Clan Ranks Icon",
description = "Configures whether the clan ranks icons are shown next to name in chat"
)
default boolean clanRank()
{
return true;
}
}

View File

@@ -28,7 +28,6 @@ import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.eventbus.Subscribe;
import com.google.inject.Provides;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.DataBufferByte;
@@ -48,11 +47,10 @@ import net.runelite.api.ClanMemberRank;
import net.runelite.api.Client;
import net.runelite.api.GameState;
import net.runelite.api.IndexedSprite;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.config.ConfigManager;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.SetMessage;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.task.Schedule;
@@ -78,15 +76,6 @@ public class ClanChatPlugin extends Plugin
@Inject
private Client client;
@Inject
private ClanChatConfig config;
@Provides
ClanChatConfig provideConfig(ConfigManager configManager)
{
return configManager.getConfig(ClanChatConfig.class);
}
@Override
protected void startUp() throws Exception
{
@@ -152,7 +141,7 @@ public class ClanChatPlugin extends Plugin
return;
}
if (config.clanRank() && setMessage.getType() == ChatMessageType.CLANCHAT)
if (setMessage.getType() == ChatMessageType.CLANCHAT)
{
insertClanRankIcon(setMessage);
}

View File

@@ -1,50 +0,0 @@
/*
* Copyright (c) 2016-2017, Seth <Sethtroll3@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
package net.runelite.client.plugins.cluescrolls;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup(
keyName = "cluescrolls",
name = "Clue Scrolls",
description = "Configuration for the clue scroll plugin"
)
public interface ClueScrollConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable",
description = "Configures whether the clue scroll plugin is displayed"
)
default boolean enabled()
{
return true;
}
}

View File

@@ -44,28 +44,21 @@ public class ClueScrollOverlay extends Overlay
private static final Duration WAIT_DURATION = Duration.ofMinutes(4);
private final Client client;
private final ClueScrollConfig config;
private final PanelComponent panelComponent = new PanelComponent();
ClueScroll clue;
Instant clueTimeout;
@Inject
public ClueScrollOverlay(@Nullable Client client, ClueScrollConfig config)
public ClueScrollOverlay(@Nullable Client client)
{
setPosition(OverlayPosition.TOP_LEFT);
this.client = client;
this.config = config;
}
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled())
{
return null;
}
if (clue == null)
{
return null;

View File

@@ -27,7 +27,6 @@
package net.runelite.client.plugins.cluescrolls;
import com.google.inject.Binder;
import com.google.inject.Provides;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import javax.inject.Inject;
@@ -35,7 +34,6 @@ import net.runelite.api.Client;
import net.runelite.api.GameState;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.task.Schedule;
@@ -48,9 +46,6 @@ public class ClueScrollPlugin extends Plugin
@Inject
private Client client;
@Inject
private ClueScrollConfig config;
@Inject
private ClueScrollOverlay clueScrollOverlay;
@@ -60,12 +55,6 @@ public class ClueScrollPlugin extends Plugin
binder.bind(ClueScrollOverlay.class);
}
@Provides
ClueScrollConfig provideConfig(ConfigManager configManager)
{
return configManager.getConfig(ClueScrollConfig.class);
}
@Override
public ClueScrollOverlay getOverlay()
{
@@ -78,7 +67,7 @@ public class ClueScrollPlugin extends Plugin
)
public void checkForClues()
{
if (client.getGameState() != GameState.LOGGED_IN || !config.enabled())
if (client.getGameState() != GameState.LOGGED_IN)
{
return;
}

View File

@@ -1,47 +0,0 @@
/*
* Copyright (c) 2017, Devin French <https://github.com/devinfrench>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.combatlevel;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup(
keyName = "combatlevel",
name = "Combat Level",
description = "Configuration for the precise combat level plugin"
)
public interface CombatLevelConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not precise combat level is displayed"
)
default boolean enabled()
{
return true;
}
}

View File

@@ -25,7 +25,6 @@
package net.runelite.client.plugins.combatlevel;
import com.google.common.eventbus.Subscribe;
import com.google.inject.Provides;
import java.text.DecimalFormat;
import javax.inject.Inject;
import net.runelite.api.Client;
@@ -35,7 +34,6 @@ import net.runelite.api.Skill;
import net.runelite.api.events.GameTick;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
@@ -49,13 +47,20 @@ public class CombatLevelPlugin extends Plugin
@Inject
Client client;
@Inject
CombatLevelConfig config;
@Provides
CombatLevelConfig provideConfig(ConfigManager configManager)
@Override
protected void shutDown() throws Exception
{
return configManager.getConfig(CombatLevelConfig.class);
Widget combatLevelWidget = client.getWidget(WidgetInfo.COMBAT_LEVEL);
if (combatLevelWidget != null)
{
String widgetText = combatLevelWidget.getText();
if (widgetText.contains("."))
{
combatLevelWidget.setText(widgetText.substring(0, widgetText.indexOf(".")));
}
}
}
@Subscribe
@@ -72,9 +77,7 @@ public class CombatLevelPlugin extends Plugin
return;
}
if (config.enabled())
{
double combatLevelPrecise = Experience.getCombatLevelPrecise(
double combatLevelPrecise = Experience.getCombatLevelPrecise(
client.getRealSkillLevel(Skill.ATTACK),
client.getRealSkillLevel(Skill.STRENGTH),
client.getRealSkillLevel(Skill.DEFENCE),
@@ -82,16 +85,8 @@ public class CombatLevelPlugin extends Plugin
client.getRealSkillLevel(Skill.MAGIC),
client.getRealSkillLevel(Skill.RANGED),
client.getRealSkillLevel(Skill.PRAYER)
);
combatLevelWidget.setText("Combat Lvl: " + decimalFormat.format(combatLevelPrecise));
}
else
{
String widgetText = combatLevelWidget.getText();
if (widgetText.contains("."))
{
combatLevelWidget.setText(widgetText.substring(0, widgetText.indexOf(".")));
}
}
);
combatLevelWidget.setText("Combat Lvl: " + decimalFormat.format(combatLevelPrecise));
}
}

View File

@@ -1,47 +0,0 @@
/*
* Copyright (c) 2018, oplosthee <https://github.com/oplosthee>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.diaryprogress;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup(
keyName = "diaryprogress",
name = "Diary Progress",
description = "Configuration for the plugin for enabling and disabling diary progress indicators"
)
public interface DiaryProgressConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not to display diary progress indicators"
)
default boolean enabled()
{
return false;
}
}

View File

@@ -26,18 +26,17 @@ package net.runelite.client.plugins.diaryprogress;
import com.google.common.eventbus.Subscribe;
import com.google.inject.Inject;
import com.google.inject.Provides;
import net.runelite.api.Client;
import net.runelite.api.Varbits;
import net.runelite.api.events.GameTick;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
@PluginDescriptor(
name = "Diary Progress plugin"
name = "Diary Progress plugin",
enabledByDefault = false
)
public class DiaryProgressPlugin extends Plugin
{
@@ -47,13 +46,21 @@ public class DiaryProgressPlugin extends Plugin
@Inject
private Client client;
@Inject
private DiaryProgressConfig config;
@Provides
DiaryProgressConfig provideConfig(ConfigManager configManager)
@Override
protected void shutDown() throws Exception
{
return configManager.getConfig(DiaryProgressConfig.class);
Widget diaryWidget = client.getWidget(WidgetInfo.DIARY_LIST);
if (diaryWidget == null)
{
return;
}
for (DiaryEntry entry : DiaryEntry.values())
{
Widget child = diaryWidget.getChild(entry.getIndex());
child.setText(entry.getName());
}
}
@Subscribe
@@ -71,28 +78,20 @@ public class DiaryProgressPlugin extends Plugin
Widget child = diaryWidget.getChild(entry.getIndex());
StringBuilder progress = new StringBuilder();
if (config.enabled())
for (Varbits varbits : entry.getVarbits())
{
for (Varbits varbits : entry.getVarbits())
int value = client.getSetting(varbits);
if ((entry != DiaryEntry.KARAMJA && value == 1) || value == 2)
{
int value = client.getSetting(varbits);
if ((entry != DiaryEntry.KARAMJA && value == 1) || value == 2)
{
progress.append(STAGE_FINISHED_STRING);
}
else
{
progress.append(STAGE_UNFINISHED_STRING);
}
progress.append(STAGE_FINISHED_STRING);
}
else
{
progress.append(STAGE_UNFINISHED_STRING);
}
progress.append("</col> ").append(entry.getName());
}
else
{
progress.append(entry.getName());
}
progress.append("</col> ").append(entry.getName());
child.setText(progress.toString());
}
}

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface DiscordConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not Discord plugin is enabled"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "actionTimeout",
name = "Action timeout (minutes)",

View File

@@ -68,11 +68,6 @@ public class DiscordPlugin extends Plugin
@Subscribe
public void onGameStateChanged(GameStateChanged event)
{
if (!config.enabled())
{
return;
}
updateGameStatus(event.getGameState(), false);
}
@@ -87,11 +82,6 @@ public class DiscordPlugin extends Plugin
return;
}
if (!config.enabled())
{
return;
}
final DiscordGameEventType discordGameEventType = DiscordGameEventType.fromSkill(event.getSkill());
if (discordGameEventType != null)
@@ -106,11 +96,6 @@ public class DiscordPlugin extends Plugin
)
public void checkForValidStatus()
{
if (!config.enabled())
{
return;
}
if (discordState.checkForTimeout(config.actionTimeout()))
{
updateGameStatus(client.getGameState(), true);
@@ -123,11 +108,6 @@ public class DiscordPlugin extends Plugin
)
public void flushDiscordStatus()
{
if (!config.enabled())
{
return;
}
discordState.flushEvent(discordService);
}

View File

@@ -36,17 +36,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface ExamineConfig extends Config
{
@ConfigItem(
position = 1,
keyName = "itemPrice",
name = "Show item price on examine",
description = "Configures whether the item price is shown when examining item"
)
default boolean itemPrice()
{
return true;
}
@ConfigItem(
position = 2,
keyName = "hexColorExamine",

View File

@@ -24,6 +24,8 @@
*/
package net.runelite.client.plugins.examine;
import static net.runelite.api.widgets.WidgetInfo.TO_CHILD;
import static net.runelite.api.widgets.WidgetInfo.TO_GROUP;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.eventbus.Subscribe;
@@ -39,6 +41,10 @@ import net.runelite.api.ChatMessageType;
import net.runelite.api.Client;
import net.runelite.api.GameState;
import net.runelite.api.ItemComposition;
import net.runelite.api.events.ChatMessage;
import net.runelite.api.events.ConfigChanged;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.MenuOptionClicked;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetItem;
@@ -47,17 +53,11 @@ import net.runelite.client.chat.ChatColorType;
import net.runelite.client.chat.ChatMessageBuilder;
import net.runelite.client.chat.ChatMessageManager;
import net.runelite.client.config.ConfigManager;
import net.runelite.api.events.ChatMessage;
import net.runelite.api.events.ConfigChanged;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.MenuOptionClicked;
import net.runelite.client.game.ItemManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.http.api.examine.ExamineClient;
import net.runelite.http.api.item.ItemPrice;
import static net.runelite.api.widgets.WidgetInfo.TO_CHILD;
import static net.runelite.api.widgets.WidgetInfo.TO_GROUP;
/**
* Submits exammine info to the api
@@ -208,11 +208,7 @@ public class ExaminePlugin extends Plugin
log.debug("Got examine for {} {}: {}", pendingExamine.getType(), pendingExamine.getId(), event.getMessage());
if (config.itemPrice())
{
findExamineItem(pendingExamine);
}
findExamineItem(pendingExamine);
CacheKey key = new CacheKey(type, pendingExamine.getId());
Boolean cached = cache.getIfPresent(key);
if (cached != null)

View File

@@ -36,16 +36,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface ExperienceDropConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not plugin is enabled."
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "meleePrayerColor",
name = "Melee Prayer Color",

View File

@@ -67,7 +67,7 @@ public class ExperienceDropPlugin extends Plugin
}
PrayerType prayer = getActivePrayerType();
if (!config.enabled() || widget.isHidden())
if (widget.isHidden())
{
return;
}

View File

@@ -1,47 +0,0 @@
/*
* Copyright (c) 2017, Devin French <https://github.com/devinfrench>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.fightcave;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup(
keyName = "fightcave",
name = "Fight Cave",
description = "Configuration for the fight cave plugin"
)
public interface FightCaveConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not fight cave overlay is displayed"
)
default boolean enabled()
{
return true;
}
}

View File

@@ -25,7 +25,6 @@
package net.runelite.client.plugins.fightcave;
import com.google.inject.Binder;
import com.google.inject.Provides;
import java.time.temporal.ChronoUnit;
import javax.inject.Inject;
import net.runelite.api.Client;
@@ -33,7 +32,6 @@ import net.runelite.api.GameState;
import net.runelite.api.NPC;
import net.runelite.api.Query;
import net.runelite.api.queries.NPCQuery;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.task.Schedule;
@@ -51,9 +49,6 @@ public class FightCavePlugin extends Plugin
@Inject
private QueryRunner queryRunner;
@Inject
private FightCaveConfig config;
@Inject
private FightCaveOverlay overlay;
@@ -65,12 +60,6 @@ public class FightCavePlugin extends Plugin
binder.bind(FightCaveOverlay.class);
}
@Provides
FightCaveConfig provideConfig(ConfigManager configManager)
{
return configManager.getConfig(FightCaveConfig.class);
}
@Override
public Overlay getOverlay()
{
@@ -83,7 +72,7 @@ public class FightCavePlugin extends Plugin
)
public void update()
{
if (!config.enabled() || client.getGameState() != GameState.LOGGED_IN)
if (client.getGameState() != GameState.LOGGED_IN)
{
return;
}

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface FishingConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable",
description = "Configures whether or not the fishing plugin is displayed"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "showIcons",
name = "Display Fish icons",

View File

@@ -58,11 +58,6 @@ class FishingOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled())
{
return null;
}
FishingSession session = plugin.getSession();
if (session.getLastFishCaught() == null)

View File

@@ -38,25 +38,18 @@ import net.runelite.client.ui.overlay.OverlayUtil;
class FishingSpotMinimapOverlay extends Overlay
{
private final FishingPlugin plugin;
private final FishingConfig config;
@Inject
public FishingSpotMinimapOverlay(FishingPlugin plugin, FishingConfig config)
public FishingSpotMinimapOverlay(FishingPlugin plugin)
{
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ABOVE_WIDGETS);
this.plugin = plugin;
this.config = config;
}
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled())
{
return null;
}
NPC[] fishingSpots = plugin.getFishingSpots();
if (fishingSpots == null)
{

View File

@@ -57,11 +57,6 @@ class FishingSpotOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled())
{
return null;
}
NPC[] fishingSpots = plugin.getFishingSpots();
if (fishingSpots == null)
{

View File

@@ -38,16 +38,6 @@ import java.awt.Color;
)
public interface GroundItemsConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not item names/quantities are displayed"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "showGEPrice",
name = "Show Grand Exchange Prices",

View File

@@ -99,11 +99,6 @@ public class GroundItemsOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, java.awt.Point parent)
{
if (!config.enabled())
{
return null;
}
// gets the hidden/highlighted items from the text box in the config
String configItems = config.getHiddenItems().toLowerCase();
List<String> hiddenItems = Arrays.asList(configItems.split(DELIMITER_REGEX));

View File

@@ -60,16 +60,14 @@ public class CatchrateOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (config.enabled())
if (Duration.between(plugin.getLastActionTime(), Instant.now()).compareTo(catchRatePanelTimeOut) < 0)
{
if (Duration.between(plugin.getLastActionTime(), Instant.now()).compareTo(catchRatePanelTimeOut) < 0)
{
final String attackStyleString = String.format("%.2f", plugin.getCatchRate() * 100) + " %";
catchRatePanel.setTitle(attackStyleString);
catchRatePanel.setWidth(80);
return catchRatePanel.render(graphics, parent);
}
final String attackStyleString = String.format("%.2f", plugin.getCatchRate() * 100) + " %";
catchRatePanel.setTitle(attackStyleString);
catchRatePanel.setWidth(80);
return catchRatePanel.render(graphics, parent);
}
return null;
}

View File

@@ -36,17 +36,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface HunterConfig extends Config
{
@ConfigItem(
position = 0,
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not the hunter plugin is enabled"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
position = 1,
keyName = "hexColorOpenTrap",

View File

@@ -69,9 +69,6 @@ public class HunterPlugin extends Plugin
@Inject
private QueryRunner queryRunner;
@Inject
private HunterConfig config;
@Inject
private TrapOverlay trapOverlay;
@@ -109,11 +106,6 @@ public class HunterPlugin extends Plugin
@Subscribe
public void onGameObjectSpawned(GameObjectSpawned event)
{
if (!config.enabled())
{
return;
}
GameObject gameObject = event.getGameObject();
HunterTrap myTrap = getTrapFromCollection(gameObject);
@@ -199,7 +191,7 @@ public class HunterPlugin extends Plugin
lastActionTime = Instant.now();
}
break;
//Black chin shaking box
//Black chin shaking box
case ObjectID.BOX_TRAP:
case ObjectID.BOX_TRAP_2026:
case ObjectID.BOX_TRAP_2028:
@@ -279,11 +271,6 @@ public class HunterPlugin extends Plugin
)
public void updateTraps()
{
if (!config.enabled())
{
return;
}
//Check if all traps are still there, and remove the ones that are not.
//TODO: use despawn events
Iterator<HunterTrap> it = traps.iterator();

View File

@@ -81,10 +81,7 @@ public class TrapOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (config.enabled())
{
drawTraps(graphics);
}
drawTraps(graphics);
return null;
}

View File

@@ -35,17 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface IdleNotifierConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Toggles idle notifications",
position = 1
)
default boolean isEnabled()
{
return false;
}
@ConfigItem(
keyName = "tray",
name = "Send Tray Notification",

View File

@@ -152,7 +152,7 @@ public class IdleNotifierPlugin extends Plugin
@Subscribe
public void onAnimationChanged(AnimationChanged event)
{
if (!config.isEnabled() || client.getGameState() != GameState.LOGGED_IN)
if (client.getGameState() != GameState.LOGGED_IN)
{
return;
}
@@ -276,7 +276,7 @@ public class IdleNotifierPlugin extends Plugin
final Player local = client.getLocalPlayer();
final Duration waitDuration = Duration.ofMillis(config.getTimeout());
if (!config.isEnabled() || client.getGameState() != GameState.LOGGED_IN || local == null)
if (client.getGameState() != GameState.LOGGED_IN || local == null)
{
return;
}

View File

@@ -1,26 +1,26 @@
/*
* Copyright (c) 2017, Robin <robin.weymans@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/*
* Copyright (c) 2017, Robin <robin.weymans@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.implings;
@@ -40,18 +40,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface ImplingsConfig extends Config
{
@ConfigItem(
position = 0,
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not the impling plugin is enabled"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
position = 1,
keyName = "showbaby",

View File

@@ -1,47 +0,0 @@
/*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.instancemap;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup(
keyName = "instancemap",
name = "Instance Map",
description = "Displays a map of the current instance"
)
public interface InstanceMapConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Enables or disables the overlay"
)
default boolean enabled()
{
return true;
}
}

View File

@@ -24,6 +24,26 @@
*/
package net.runelite.client.plugins.instancemap;
import static net.runelite.client.plugins.instancemap.PixelMaps.ALL;
import static net.runelite.client.plugins.instancemap.PixelMaps.BOTTOM;
import static net.runelite.client.plugins.instancemap.PixelMaps.BOTTOM_LEFT_CORNER;
import static net.runelite.client.plugins.instancemap.PixelMaps.BOTTOM_LEFT_DOT;
import static net.runelite.client.plugins.instancemap.PixelMaps.BOTTOM_LEFT_TO_TOP_RIGHT;
import static net.runelite.client.plugins.instancemap.PixelMaps.BOTTOM_RIGHT_CORNER;
import static net.runelite.client.plugins.instancemap.PixelMaps.BOTTOM_RIGHT_DOT;
import static net.runelite.client.plugins.instancemap.PixelMaps.LEFT;
import static net.runelite.client.plugins.instancemap.PixelMaps.RIGHT;
import static net.runelite.client.plugins.instancemap.PixelMaps.TOP;
import static net.runelite.client.plugins.instancemap.PixelMaps.TOP_LEFT_CORNER;
import static net.runelite.client.plugins.instancemap.PixelMaps.TOP_LEFT_DOT;
import static net.runelite.client.plugins.instancemap.PixelMaps.TOP_LEFT_TO_BOTTOM_RIGHT;
import static net.runelite.client.plugins.instancemap.PixelMaps.TOP_RIGHT_CORNER;
import static net.runelite.client.plugins.instancemap.PixelMaps.TOP_RIGHT_DOT;
import static net.runelite.client.plugins.instancemap.WallOffset.BOTTOM_LEFT;
import static net.runelite.client.plugins.instancemap.WallOffset.BOTTOM_RIGHT;
import static net.runelite.client.plugins.instancemap.WallOffset.NONE;
import static net.runelite.client.plugins.instancemap.WallOffset.TOP_LEFT;
import static net.runelite.client.plugins.instancemap.WallOffset.TOP_RIGHT;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
@@ -45,26 +65,6 @@ import net.runelite.api.Tile;
import net.runelite.api.WallObject;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.MapRegionChanged;
import static net.runelite.client.plugins.instancemap.PixelMaps.ALL;
import static net.runelite.client.plugins.instancemap.PixelMaps.BOTTOM;
import static net.runelite.client.plugins.instancemap.PixelMaps.BOTTOM_LEFT_CORNER;
import static net.runelite.client.plugins.instancemap.PixelMaps.BOTTOM_LEFT_DOT;
import static net.runelite.client.plugins.instancemap.PixelMaps.BOTTOM_LEFT_TO_TOP_RIGHT;
import static net.runelite.client.plugins.instancemap.PixelMaps.BOTTOM_RIGHT_CORNER;
import static net.runelite.client.plugins.instancemap.PixelMaps.BOTTOM_RIGHT_DOT;
import static net.runelite.client.plugins.instancemap.PixelMaps.LEFT;
import static net.runelite.client.plugins.instancemap.PixelMaps.RIGHT;
import static net.runelite.client.plugins.instancemap.PixelMaps.TOP;
import static net.runelite.client.plugins.instancemap.PixelMaps.TOP_LEFT_CORNER;
import static net.runelite.client.plugins.instancemap.PixelMaps.TOP_LEFT_DOT;
import static net.runelite.client.plugins.instancemap.PixelMaps.TOP_LEFT_TO_BOTTOM_RIGHT;
import static net.runelite.client.plugins.instancemap.PixelMaps.TOP_RIGHT_CORNER;
import static net.runelite.client.plugins.instancemap.PixelMaps.TOP_RIGHT_DOT;
import static net.runelite.client.plugins.instancemap.WallOffset.BOTTOM_LEFT;
import static net.runelite.client.plugins.instancemap.WallOffset.BOTTOM_RIGHT;
import static net.runelite.client.plugins.instancemap.WallOffset.NONE;
import static net.runelite.client.plugins.instancemap.WallOffset.TOP_LEFT;
import static net.runelite.client.plugins.instancemap.WallOffset.TOP_RIGHT;
import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayLayer;
import net.runelite.client.ui.overlay.OverlayPosition;
@@ -101,8 +101,6 @@ class InstanceMapOverlay extends Overlay
private int viewedPlane = 0;
private final Client client;
private final InstanceMapConfig config;
private final InstanceMapPlugin plugin;
/**
* Saved image of the region, no reason to draw the whole thing every
@@ -112,13 +110,11 @@ class InstanceMapOverlay extends Overlay
private boolean showMap = false;
@Inject
InstanceMapOverlay(@Nullable Client client, InstanceMapConfig config, InstanceMapPlugin plugin)
InstanceMapOverlay(@Nullable Client client)
{
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ALWAYS_ON_TOP);
this.client = client;
this.config = config;
this.plugin = plugin;
}
public boolean isMapShown()
@@ -173,7 +169,7 @@ class InstanceMapOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, java.awt.Point parent)
{
if (!config.enabled() || !showMap)
if (!showMap)
{
return null;
}

View File

@@ -24,17 +24,14 @@
*/
package net.runelite.client.plugins.instancemap;
import static net.runelite.api.widgets.WidgetInfo.WORLD_MAP;
import com.google.common.eventbus.Subscribe;
import com.google.inject.Binder;
import com.google.inject.Provides;
import javax.inject.Inject;
import net.runelite.api.widgets.WidgetInfo;
import static net.runelite.api.widgets.WidgetInfo.WORLD_MAP;
import net.runelite.client.config.ConfigManager;
import net.runelite.api.events.ConfigChanged;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.MapRegionChanged;
import net.runelite.api.events.WidgetMenuOptionClicked;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.menus.MenuManager;
import net.runelite.client.menus.WidgetMenuOption;
import net.runelite.client.plugins.Plugin;
@@ -50,9 +47,6 @@ public class InstanceMapPlugin extends Plugin
private final WidgetMenuOption ascendOption = new WidgetMenuOption("Ascend", "Instance Map", WidgetInfo.WORLD_MAP);
private final WidgetMenuOption descendOption = new WidgetMenuOption("Descend", "Instance Map", WidgetInfo.WORLD_MAP);
@Inject
private InstanceMapConfig config;
@Inject
private InstanceMapOverlay overlay;
@@ -65,12 +59,6 @@ public class InstanceMapPlugin extends Plugin
binder.bind(InstanceMapOverlay.class);
}
@Provides
InstanceMapConfig getConfig(ConfigManager configManager)
{
return configManager.getConfig(InstanceMapConfig.class);
}
private void addCustomOptions()
{
menuManager.addManagedCustomMenu(openMapOption);
@@ -88,10 +76,7 @@ public class InstanceMapPlugin extends Plugin
@Override
protected void startUp() throws Exception
{
if (config.enabled())
{
addCustomOptions();
}
addCustomOptions();
}
@Override
@@ -100,19 +85,6 @@ public class InstanceMapPlugin extends Plugin
removeCustomOptions();
}
@Subscribe
public void onConfigChanged(ConfigChanged event)
{
if (config.enabled())
{
addCustomOptions();
}
else
{
removeCustomOptions();
}
}
@Subscribe
public void regionChange(MapRegionChanged event)
{
@@ -133,7 +105,7 @@ public class InstanceMapPlugin extends Plugin
@Subscribe
public void onWidgetMenuOptionClicked(WidgetMenuOptionClicked event)
{
if (!config.enabled() || event.getWidget() != WORLD_MAP)
if (event.getWidget() != WORLD_MAP)
{
return;
}

View File

@@ -1,47 +0,0 @@
/*
* Copyright (c) 2017, Seth <Sethtroll3@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.jewellerycount;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup(
keyName = "jewellerycount",
name = "Jewellery Count",
description = "Configuration for the jewellery count plugin"
)
public interface JewelleryCountConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable",
description = "Configures whether or not the jewellery count plugin is displayed"
)
default boolean enabled()
{
return true;
}
}

View File

@@ -47,25 +47,18 @@ import net.runelite.client.util.QueryRunner;
class JewelleryCountOverlay extends Overlay
{
private final QueryRunner queryRunner;
private final JewelleryCountConfig config;
@Inject
JewelleryCountOverlay(QueryRunner queryRunner, JewelleryCountConfig config)
JewelleryCountOverlay(QueryRunner queryRunner)
{
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ABOVE_WIDGETS);
this.queryRunner = queryRunner;
this.config = config;
}
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled())
{
return null;
}
graphics.setFont(FontManager.getRunescapeSmallFont());
for (WidgetItem item : getJewelleryWidgetItems())

View File

@@ -25,9 +25,7 @@
package net.runelite.client.plugins.jewellerycount;
import com.google.inject.Binder;
import com.google.inject.Provides;
import javax.inject.Inject;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.ui.overlay.Overlay;
@@ -37,9 +35,6 @@ import net.runelite.client.ui.overlay.Overlay;
)
public class JewelleryCountPlugin extends Plugin
{
@Inject
private JewelleryCountConfig config;
@Inject
private JewelleryCountOverlay overlay;
@@ -49,12 +44,6 @@ public class JewelleryCountPlugin extends Plugin
binder.bind(JewelleryCountOverlay.class);
}
@Provides
JewelleryCountConfig getConfig(ConfigManager configManager)
{
return configManager.getConfig(JewelleryCountConfig.class);
}
@Override
public Overlay getOverlay()
{

View File

@@ -1,50 +0,0 @@
/*
* Copyright (c) 2018, Tomas Slusny <slusnucky@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.lowmemory;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup(
keyName = "lowmemory",
name = "Low Memory Mode",
description = "Configuration for the plugin for enabling and disabling RuneScape low memory mode"
)
public interface LowMemoryConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not low memory mode is enabled",
confirmationWarining = "Please re-log into RuneScape for this change to fully take effect.",
warnOnEnable = true,
warnOnDisable = true
)
default boolean enabled()
{
return false;
}
}

View File

@@ -25,37 +25,26 @@
package net.runelite.client.plugins.lowmemory;
import com.google.common.eventbus.Subscribe;
import com.google.inject.Provides;
import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.api.GameState;
import net.runelite.api.events.ConfigChanged;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.SessionClose;
import net.runelite.api.events.SessionOpen;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
@PluginDescriptor(name = "Low memory plugin")
@PluginDescriptor(
name = "Low memory plugin",
enabledByDefault = false
)
public class LowMemoryPlugin extends Plugin
{
@Inject
private Client client;
@Inject
private LowMemoryConfig config;
@Provides
LowMemoryConfig provideConfig(ConfigManager configManager)
{
return configManager.getConfig(LowMemoryConfig.class);
}
@Override
protected void startUp() throws Exception
{
client.changeMemoryMode(config.enabled());
client.changeMemoryMode(true);
}
@Override
@@ -64,33 +53,12 @@ public class LowMemoryPlugin extends Plugin
client.changeMemoryMode(false);
}
@Subscribe
private void onConfigChanged(ConfigChanged event)
{
if (event.getGroup().equals("lowmemory"))
{
client.changeMemoryMode(config.enabled());
}
}
@Subscribe
private void onSessionOpen(SessionOpen event)
{
client.changeMemoryMode(config.enabled());
}
@Subscribe
private void onSessionClose(SessionClose event)
{
client.changeMemoryMode(config.enabled());
}
@Subscribe
private void onGameStateChanged(GameStateChanged event)
{
if (event.getGameState() == GameState.LOGIN_SCREEN)
{
client.changeMemoryMode(config.enabled());
client.changeMemoryMode(true);
}
}
}
}

View File

@@ -36,7 +36,8 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
@PluginDescriptor(
name = "Metronome plugin"
name = "Metronome plugin",
enabledByDefault = false
)
public class MetronomePlugin extends Plugin
{
@@ -58,7 +59,7 @@ public class MetronomePlugin extends Plugin
@Subscribe
void onTick(GameTick tick)
{
if (!config.enabled() || config.tickCount() == 0)
if (config.tickCount() == 0)
{
return;
}

View File

@@ -36,17 +36,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface MetronomePluginConfiguration extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable metronome",
description = "Toggles tick metronome",
position = 1
)
default boolean enabled()
{
return false;
}
@ConfigItem(
keyName = "tickCount",
name = "Tick count",

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface MotherlodeConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable",
description = "Configures whether or not the motherlode plugin is displayed"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "showRocks",
name = "Show Pay-dirt mining spots",

View File

@@ -74,11 +74,6 @@ class MotherlodeOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled())
{
return null;
}
MotherlodeSession session = plugin.getSession();
if (session.getLastPayDirtMined() == null)

View File

@@ -64,7 +64,8 @@ import net.runelite.client.task.Schedule;
import net.runelite.client.ui.overlay.Overlay;
@PluginDescriptor(
name = "Motherlode plugin"
name = "Motherlode plugin",
enabledByDefault = false
)
public class MotherlodePlugin extends Plugin
{

View File

@@ -69,7 +69,7 @@ class MotherlodeRocksOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, java.awt.Point parent)
{
if (!config.enabled() || !config.showRocks())
if (!config.showRocks())
{
return null;
}

View File

@@ -54,11 +54,6 @@ class MotherlodeSackOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled())
{
return null;
}
Widget sack = client.getWidget(WidgetInfo.MOTHERLODE_MINE);
panelComponent.getLines().clear();

View File

@@ -1,47 +0,0 @@
/*
* Copyright (c) 2017, Seth <Sethtroll3@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.mousehighlight;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup(
keyName = "mousehighlight",
name = "Mouse Highlighting",
description = "Configuration for the mouse Highlight plugin"
)
public interface MouseHighlightConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not mouse hover info is displayed"
)
default boolean enabled()
{
return true;
}
}

View File

@@ -38,27 +38,20 @@ import net.runelite.client.ui.overlay.tooltip.TooltipManager;
class MouseHighlightOverlay extends Overlay
{
private final MouseHighlightConfig config;
private final TooltipManager tooltipManager;
private final Client client;
@Inject
MouseHighlightOverlay(@Nullable Client client, MouseHighlightConfig config, TooltipManager tooltipManager)
MouseHighlightOverlay(@Nullable Client client, TooltipManager tooltipManager)
{
setPosition(OverlayPosition.DYNAMIC);
this.client = client;
this.config = config;
this.tooltipManager = tooltipManager;
}
@Override
public Dimension render(Graphics2D graphics, Point point)
{
if (!config.enabled())
{
return null;
}
if (client.isMenuOpen())
{
return null;

View File

@@ -25,9 +25,7 @@
package net.runelite.client.plugins.mousehighlight;
import com.google.inject.Binder;
import com.google.inject.Provides;
import javax.inject.Inject;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.ui.overlay.Overlay;
@@ -37,9 +35,6 @@ import net.runelite.client.ui.overlay.Overlay;
)
public class MouseHighlightPlugin extends Plugin
{
@Inject
private MouseHighlightConfig config;
@Inject
private MouseHighlightOverlay overlay;
@@ -49,12 +44,6 @@ public class MouseHighlightPlugin extends Plugin
binder.bind(MouseHighlightOverlay.class);
}
@Provides
MouseHighlightConfig getConfig(ConfigManager configManager)
{
return configManager.getConfig(MouseHighlightConfig.class);
}
@Override
public Overlay getOverlay()
{

View File

@@ -35,17 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface NightmareZoneConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable plugin",
description = "Configures whether or not the plugin is enabled",
position = 1
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "tray",
name = "Send Tray Notification",

View File

@@ -72,7 +72,7 @@ class NightmareZoneOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled() || !plugin.isInNightmareZone() || !config.moveOverlay())
if (!plugin.isInNightmareZone() || !config.moveOverlay())
{
if (absorptionCounter != null)
{

View File

@@ -88,7 +88,7 @@ public class NightmareZonePlugin extends Plugin
@Subscribe
public void onGameTick(GameTick event)
{
if (!config.enabled() || !isInNightmareZone())
if (!isInNightmareZone())
{
return;
}
@@ -101,8 +101,7 @@ public class NightmareZonePlugin extends Plugin
@Subscribe
public void onChatMessage(ChatMessage event)
{
if (!config.enabled()
|| event.getType() != ChatMessageType.SERVER
if (event.getType() != ChatMessageType.SERVER
|| !isInNightmareZone()
|| !config.overloadNotification())
{

View File

@@ -1,47 +0,0 @@
/*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.opponentinfo;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup(
keyName = "oppinfo",
name = "Opponent Info",
description = "Configuration for the opponent info plugin"
)
public interface OpponentConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not opponent info is displayed"
)
default boolean enabled()
{
return true;
}
}

View File

@@ -60,7 +60,6 @@ class OpponentInfoOverlay extends Overlay
private static final Duration WAIT = Duration.ofSeconds(3);
private final Client client;
private final OpponentConfig config;
private Integer lastMaxHealth;
private DecimalFormat df = new DecimalFormat("0.0");
private float lastRatio = 0;
@@ -69,12 +68,11 @@ class OpponentInfoOverlay extends Overlay
private Map<String, Integer> oppInfoHealth = OpponentInfoPlugin.loadNpcHealth();
@Inject
OpponentInfoOverlay(@Nullable Client client, OpponentConfig config)
OpponentInfoOverlay(@Nullable Client client)
{
setPosition(OverlayPosition.TOP_LEFT);
setPriority(OverlayPriority.HIGH);
this.client = client;
this.config = config;
}
private Actor getOpponent()
@@ -91,11 +89,6 @@ class OpponentInfoOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled())
{
return null;
}
Actor opponent = getOpponent();
if (opponent != null && opponent.getHealth() > 0)

View File

@@ -27,13 +27,11 @@ package net.runelite.client.plugins.opponentinfo;
import com.google.common.reflect.TypeToken;
import com.google.gson.Gson;
import com.google.inject.Binder;
import com.google.inject.Provides;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Type;
import java.util.Map;
import javax.inject.Inject;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.ui.overlay.Overlay;
@@ -52,12 +50,6 @@ public class OpponentInfoPlugin extends Plugin
binder.bind(OpponentInfoOverlay.class);
}
@Provides
OpponentConfig getConfig(ConfigManager configManager)
{
return configManager.getConfig(OpponentConfig.class);
}
@Override
public Overlay getOverlay()
{

View File

@@ -60,7 +60,7 @@ public class BurnerOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, java.awt.Point parent)
{
if (!config.enabled() || !config.showBurner())
if (!config.showBurner())
{
return null;
}

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface PohConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not the POH plugin is displayed"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "showVarrock",
name = "Show Varrock portal",

View File

@@ -80,11 +80,6 @@ public class PohOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, java.awt.Point parent)
{
if (!config.enabled())
{
return null;
}
Point localLocation = client.getLocalPlayer().getLocalLocation();
plugin.getPohObjects().forEach((object, tile) ->
{

View File

@@ -1,47 +0,0 @@
/*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.prayflick;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.Config;
@ConfigGroup(
keyName = "prayflick",
name = "Prayer Flick",
description = "Configuration for the prayer flicking plugin"
)
public interface PrayerFlickConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not prayer flicking plugin is displayed"
)
default boolean enabled()
{
return true;
}
}

View File

@@ -44,17 +44,15 @@ import net.runelite.client.ui.overlay.OverlayPosition;
public class PrayerFlickOverlay extends Overlay
{
private final Client client;
private final PrayerFlickConfig config;
private boolean prayersActive = false;
private Instant startOfLastTick = Instant.now();
@Inject
public PrayerFlickOverlay(@Nullable Client client, PrayerFlickConfig config)
public PrayerFlickOverlay(@Nullable Client client)
{
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ABOVE_WIDGETS);
this.client = client;
this.config = config;
}
public void onTick()
@@ -66,7 +64,7 @@ public class PrayerFlickOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point point)
{
if (!config.enabled() || !prayersActive)//If there are no prayers active we don't need to be flicking
if (!prayersActive) //If there are no prayers active we don't need to be flicking
{
return null;
}

View File

@@ -26,9 +26,7 @@ package net.runelite.client.plugins.prayflick;
import com.google.common.eventbus.Subscribe;
import com.google.inject.Binder;
import com.google.inject.Provides;
import javax.inject.Inject;
import net.runelite.client.config.ConfigManager;
import net.runelite.api.events.GameTick;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
@@ -48,12 +46,6 @@ public class PrayerFlickPlugin extends Plugin
binder.bind(PrayerFlickOverlay.class);
}
@Provides
PrayerFlickConfig getConfig(ConfigManager configManager)
{
return configManager.getConfig(PrayerFlickConfig.class);
}
@Override
public Overlay getOverlay()
{

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface RememberUsernameConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable",
description = "Configures whether remember username plugin is enabled"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "username",
name = "",

View File

@@ -54,11 +54,6 @@ public class RememberUsernamePlugin extends Plugin
@Subscribe
public void onGameStateChange(GameStateChanged event)
{
if (!config.enabled())
{
return;
}
if (event.getGameState() == GameState.LOGIN_SCREEN)
{
if (config.username() == null || config.username().isEmpty())

View File

@@ -1,47 +0,0 @@
/*
* Copyright (c) 2018, Shaun Dreclin <shaundreclin@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.roguesden;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup(
keyName = "roguesden",
name = "Rogues' Den",
description = "Configuration for the Rogues' Den plugin"
)
public interface RoguesDenConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable overlay",
description = "Configures whether the overlay is enabled"
)
default boolean enabled()
{
return true;
}
}

View File

@@ -43,26 +43,19 @@ public class RoguesDenOverlay extends Overlay
private final Client client;
private final RoguesDenPlugin plugin;
private final RoguesDenConfig config;
@Inject
public RoguesDenOverlay(Client client, RoguesDenPlugin plugin, RoguesDenConfig config)
public RoguesDenOverlay(Client client, RoguesDenPlugin plugin)
{
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ABOVE_SCENE);
this.client = client;
this.plugin = plugin;
this.config = config;
}
@Override
public Dimension render(Graphics2D graphics, java.awt.Point parent)
{
if (!config.enabled())
{
return null;
}
if (!plugin.isHasGem())
{
return null;

View File

@@ -26,7 +26,6 @@ package net.runelite.client.plugins.roguesden;
import com.google.common.eventbus.Subscribe;
import com.google.inject.Binder;
import com.google.inject.Provides;
import java.time.temporal.ChronoUnit;
import java.util.HashMap;
import javax.inject.Inject;
@@ -48,7 +47,6 @@ import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.GroundObjectChanged;
import net.runelite.api.events.GroundObjectDespawned;
import net.runelite.api.events.GroundObjectSpawned;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.task.Schedule;
@@ -75,15 +73,6 @@ public class RoguesDenPlugin extends Plugin
@Getter
private RoguesDenOverlay overlay;
@Inject
private RoguesDenConfig config;
@Provides
RoguesDenConfig getConfig(ConfigManager configManager)
{
return configManager.getConfig(RoguesDenConfig.class);
}
@Override
public void configure(Binder binder)
{

View File

@@ -36,16 +36,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface RunepouchConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not Runepouch information is displayed"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "fontcolor",
name = "Font Color",

View File

@@ -81,11 +81,6 @@ public class RunepouchOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, java.awt.Point point)
{
if (!config.enabled())
{
return null;
}
Query query = new InventoryWidgetItemQuery().idEquals(ItemID.RUNE_POUCH);
WidgetItem[] items = queryRunner.runQuery(query);
if (items.length == 0)

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface SlayerConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable",
description = "Configures whether slayer plugin is enabled"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "infobox",
name = "Task InfoBox",

View File

@@ -93,11 +93,6 @@ class SlayerOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled())
{
return null;
}
if (!config.showItemOverlay())
{
return null;

View File

@@ -127,11 +127,6 @@ public class SlayerPlugin extends Plugin
@Subscribe
public void onGameStateChange(GameStateChanged event)
{
if (!config.enabled())
{
return;
}
switch (event.getGameState())
{
case HOPPING:
@@ -163,11 +158,6 @@ public class SlayerPlugin extends Plugin
)
public void scheduledChecks()
{
if (!config.enabled())
{
return;
}
Widget NPCDialog = client.getWidget(WidgetInfo.DIALOG_NPC_TEXT);
if (NPCDialog != null)
{
@@ -204,7 +194,7 @@ public class SlayerPlugin extends Plugin
@Subscribe
public void onChatMessage(ChatMessage event)
{
if (!config.enabled() || event.getType() != ChatMessageType.SERVER)
if (event.getType() != ChatMessageType.SERVER)
{
return;
}
@@ -259,7 +249,7 @@ public class SlayerPlugin extends Plugin
@Subscribe
public void onExperienceChanged(ExperienceChanged event)
{
if (!config.enabled() || event.getSkill() != SLAYER)
if (event.getSkill() != SLAYER)
{
return;
}
@@ -290,7 +280,7 @@ public class SlayerPlugin extends Plugin
return;
}
boolean enabled = config.enabled() && config.showInfobox();
boolean enabled = config.showInfobox();
if (enabled && counter == null)
{
addCounter();

View File

@@ -1,47 +0,0 @@
/*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.specorb;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup(
keyName = "specorb",
name = "Special Attack Orb",
description = "Configuration for the Special Attack Orbplugin"
)
public interface SpecOrbConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not Special Attack Orb plugin is displayed"
)
default boolean enabled()
{
return true;
}
}

View File

@@ -61,29 +61,22 @@ public class SpecOrbOverlay extends Overlay
private static final Color SPECIAL_ORB_RECHARGE_COLOR = new Color(153, 204, 255, 50);
private final Client client;
private final SpecOrbConfig config;
private final SpecOrbPlugin plugin;
private int lastSpecialPercent = 0;
private int tickCounter = 0;
@Inject
public SpecOrbOverlay(@Nullable Client client, SpecOrbConfig config, SpecOrbPlugin plugin)
public SpecOrbOverlay(@Nullable Client client, SpecOrbPlugin plugin)
{
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ABOVE_WIDGETS);
this.client = client;
this.config = config;
this.plugin = plugin;
}
@Override
public Dimension render(Graphics2D graphics, java.awt.Point point)
{
if (!config.enabled())
{
return null;
}
Widget prayerOrb = client.getWidget(WidgetInfo.MINIMAP_PRAYER_ORB);
if (prayerOrb == null)
{

View File

@@ -26,18 +26,15 @@ package net.runelite.client.plugins.specorb;
import com.google.common.eventbus.Subscribe;
import com.google.inject.Binder;
import com.google.inject.Provides;
import net.runelite.client.config.ConfigManager;
import java.awt.Image;
import javax.imageio.ImageIO;
import javax.inject.Inject;
import net.runelite.api.events.GameTick;
import net.runelite.api.events.VarbitChanged;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.ui.overlay.Overlay;
import javax.imageio.ImageIO;
import javax.inject.Inject;
import java.awt.Image;
@PluginDescriptor(
name = "Special Attack Orb plugin"
)
@@ -55,12 +52,6 @@ public class SpecOrbPlugin extends Plugin
binder.bind(SpecOrbOverlay.class);
}
@Provides
SpecOrbConfig getConfig(ConfigManager configManager)
{
return configManager.getConfig(SpecOrbConfig.class);
}
@Override
public Overlay getOverlay()
{

View File

@@ -36,16 +36,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface TileIndicatorsConfig extends Config
{
@ConfigItem(
keyName = "highlightDestination",
name = "Highlight current destination (walk-to) tile",
description = "Configures whether or not current destination tile is highlighted"
)
default boolean highlightDestination()
{
return false;
}
@ConfigItem(
keyName = "highlightDestinationColor",
name = "Color of current destination highlighting",

View File

@@ -54,8 +54,7 @@ public class TileIndicatorsOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, java.awt.Point parent)
{
if (config.highlightDestination()
&& client.getSceneDestinationLocation().getX() >= 0
if (client.getSceneDestinationLocation().getX() >= 0
&& client.getSceneDestinationLocation().getY() >= 0)
{
drawRegionTile(graphics, client.getSceneDestinationLocation(), config.highlightDestinationColor());

View File

@@ -33,7 +33,8 @@ import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.ui.overlay.Overlay;
@PluginDescriptor(
name = "Tile Indicators plugin"
name = "Tile Indicators plugin",
enabledByDefault = false
)
public class TileIndicatorsPlugin extends Plugin
{

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface TimersConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable",
description = "Configures whether the timer plugin is displayed"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "showStamina",
name = "Stamina timer",

View File

@@ -115,12 +115,6 @@ 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);
@@ -226,11 +220,6 @@ 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
@@ -259,10 +248,6 @@ public class TimersPlugin extends Plugin
@Subscribe
public void onChatMessage(ChatMessage event)
{
if (!config.enabled())
{
return;
}
if (event.getType() != ChatMessageType.FILTERED && event.getType() != ChatMessageType.SERVER)
{
@@ -383,11 +368,6 @@ public class TimersPlugin extends Plugin
@Subscribe
public void onGraphicChanged(GraphicChanged event)
{
if (!config.enabled())
{
return;
}
Actor actor = event.getActor();
if (actor != client.getLocalPlayer())

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface WoodcuttingConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enable",
description = "Configures whether the woodcutting plugin is displayed"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "statTimeout",
name = "Reset stats (minutes)",

View File

@@ -24,6 +24,15 @@
*/
package net.runelite.client.plugins.woodcutting;
import static net.runelite.api.AnimationID.WOODCUTTING_ADAMANT;
import static net.runelite.api.AnimationID.WOODCUTTING_BLACK;
import static net.runelite.api.AnimationID.WOODCUTTING_BRONZE;
import static net.runelite.api.AnimationID.WOODCUTTING_DRAGON;
import static net.runelite.api.AnimationID.WOODCUTTING_INFERNAL;
import static net.runelite.api.AnimationID.WOODCUTTING_IRON;
import static net.runelite.api.AnimationID.WOODCUTTING_MITHRIL;
import static net.runelite.api.AnimationID.WOODCUTTING_RUNE;
import static net.runelite.api.AnimationID.WOODCUTTING_STEEL;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
@@ -33,7 +42,6 @@ import java.time.Instant;
import java.util.stream.IntStream;
import javax.annotation.Nullable;
import javax.inject.Inject;
import static net.runelite.api.AnimationID.*;
import net.runelite.api.Client;
import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayPosition;
@@ -65,11 +73,6 @@ class WoodcuttingOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics, Point parent)
{
if (!config.enabled())
{
return null;
}
WoodcuttingSession session = plugin.getSession();
if (session.getLastLogCut() == null)

View File

@@ -35,16 +35,6 @@ import net.runelite.client.config.ConfigItem;
)
public interface XpGlobesConfig extends Config
{
@ConfigItem(
keyName = "enabled",
name = "Enabled",
description = "Configures whether or not XP globes are displayed"
)
default boolean enabled()
{
return true;
}
@ConfigItem(
keyName = "enableTooltips",
name = "Enable Tooltips",

Some files were not shown because too many files have changed in this diff Show More