diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsConfig.java index bd1fbe4319..83e25ffdc6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsConfig.java @@ -39,33 +39,11 @@ public interface PvpToolsConfig extends Config return true; } - @ConfigItem( - keyName = "fallInHelper", - name = "Fall In Helper", - description = "Hides all non-friendly player entities other than the one that is attacking you.", - position = 2 - ) - default boolean fallInHelper() - { - return true; - } - - @ConfigItem( - keyName = "hotkey", - name = "Fall In Hotkey", - description = "Turns the fall in helper on or off when you press this hotkey", - position = 3 - ) - default Keybind hotkey() - { - return Keybind.NOT_SET; - } - @ConfigItem( keyName = "renderSelfHotkey", name = "Render Self Hotkey", description = "Toggles renderself when you press the hotkey", - position = 4 + position = 2 ) default Keybind renderSelf() { @@ -76,7 +54,7 @@ public interface PvpToolsConfig extends Config keyName = "hideAttack", name = "Hide attack", description = "Hides the attack option for clanmates, friends, or both", - position = 5 + position = 3 ) default boolean hideAttack() { @@ -87,7 +65,7 @@ public interface PvpToolsConfig extends Config keyName = "hideAttackMode", name = "Mode", description = "", - position = 6, + position = 4, hidden = true, unhide = "hideAttack" ) @@ -100,7 +78,7 @@ public interface PvpToolsConfig extends Config keyName = "hideCast", name = "Hide cast", description = "Hides the cast option for clanmates, friends, or both", - position = 7 + position = 5 ) default boolean hideCast() { @@ -111,7 +89,7 @@ public interface PvpToolsConfig extends Config keyName = "hideCastMode", name = "Mode", description = "", - position = 8, + position = 6, hidden = true, unhide = "hideCast" ) @@ -124,7 +102,7 @@ public interface PvpToolsConfig extends Config keyName = "hideCastIgnored", name = "Ignored spells", description = "Spells that should not be hidden from being cast, separated by a comma", - position = 9, + position = 7, hidden = true, unhide = "hideCast" ) @@ -137,7 +115,7 @@ public interface PvpToolsConfig extends Config keyName = "riskCalculator", name = "Risk Calculator", description = "Enables a panel in the PvP Tools Panel that shows the players current risk", - position = 10 + position = 8 ) default boolean riskCalculatorEnabled() { @@ -148,7 +126,7 @@ public interface PvpToolsConfig extends Config keyName = "missingPlayers", name = "Missing CC Players", description = "Adds a button to the PvP Tools panel that opens a window showing which CC members are not at the current players location", - position = 11 + position = 9 ) default boolean missingPlayersEnabled() { @@ -159,7 +137,7 @@ public interface PvpToolsConfig extends Config keyName = "currentPlayers", name = "Current CC Players", description = "Adds a button to the PvP Tools panel that opens a window showing which CC members currently at the players location", - position = 12 + position = 10 ) default boolean currentPlayersEnabled() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsOverlay.java deleted file mode 100644 index 5aceb68fa7..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsOverlay.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2019. PKLite - All Rights Reserved - * Unauthorized modification, distribution, or possession of this source file, via any medium is strictly prohibited. - * Proprietary and confidential. Refer to PKLite License file for more information on - * full terms of this copyright and to determine what constitutes authorized use. - * Written by PKLite(ST0NEWALL, others) , 2019 - * - */ - -package net.runelite.client.plugins.pvptools; - -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Graphics2D; -import javax.inject.Inject; -import javax.inject.Singleton; -import net.runelite.api.Point; -import net.runelite.client.ui.FontManager; -import net.runelite.client.ui.overlay.Overlay; -import net.runelite.client.ui.overlay.OverlayLayer; -import net.runelite.client.ui.overlay.OverlayPosition; -import net.runelite.client.ui.overlay.OverlayPriority; -import net.runelite.client.ui.overlay.OverlayUtil; - -@Singleton -public class PvpToolsOverlay extends Overlay -{ - private final PvpToolsPlugin pvpToolsPlugin; - - @Inject - private PvpToolsOverlay(final PvpToolsPlugin pvpToolsPlugin) - { - this.pvpToolsPlugin = pvpToolsPlugin; - setLayer(OverlayLayer.ABOVE_WIDGETS); - setPriority(OverlayPriority.HIGH); - setPosition(OverlayPosition.DYNAMIC); - } - - - @Override - public Dimension render(Graphics2D graphics) - { - if (pvpToolsPlugin.isFallInHelper() && pvpToolsPlugin.fallinHelperEnabled) - { - graphics.setFont(FontManager.getRunescapeFont().deriveFont(28)); - OverlayUtil.renderTextLocation(graphics, new Point(200, 80), "FALL IN HELPER ENABLED", Color.YELLOW); - } - return null; - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsPlugin.java index b601dde072..aace279a7b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsPlugin.java @@ -77,13 +77,9 @@ import org.apache.commons.lang3.ArrayUtils; @Singleton public class PvpToolsPlugin extends Plugin { - @Inject - PvpToolsOverlay pvpToolsOverlay; - @Inject PlayerCountOverlay playerCountOverlay; - boolean fallinHelperEnabled = false; private PvpToolsPanel panel; private MissingPlayersJFrame missingPlayersJFrame; private CurrentPlayersJFrame currentPlayersJFrame; @@ -154,8 +150,6 @@ public class PvpToolsPlugin extends Plugin private boolean countPlayers; private boolean countOverHeads; @Getter(AccessLevel.PACKAGE) - private boolean fallInHelper; - private Keybind hotkey; private Keybind renderSelf; private boolean riskCalculatorEnabled; private boolean missingPlayersEnabled; @@ -175,17 +169,6 @@ public class PvpToolsPlugin extends Plugin @Inject private PvpToolsConfig config; - /** - * The HotKeyListener for the hot key assigned in the config that triggers the Fall In Helper feature - */ - private final HotkeyListener fallinHotkeyListener = new HotkeyListener(() -> this.hotkey) - { - public void hotkeyPressed() - { - toggleFallinHelper(); - } - }; - private final HotkeyListener renderselfHotkeyListener = new HotkeyListener(() -> this.renderSelf) { public void hotkeyPressed() @@ -252,9 +235,7 @@ public class PvpToolsPlugin extends Plugin updateConfig(); addSubscriptions(); - overlayManager.add(pvpToolsOverlay); overlayManager.add(playerCountOverlay); - keyManager.registerKeyListener(fallinHotkeyListener); keyManager.registerKeyListener(renderselfHotkeyListener); final BufferedImage icon = ImageUtil.getResourceStreamFromClass(getClass(), "skull.png"); @@ -293,9 +274,7 @@ public class PvpToolsPlugin extends Plugin { eventBus.unregister(this); - overlayManager.remove(pvpToolsOverlay); overlayManager.remove(playerCountOverlay); - keyManager.unregisterKeyListener(fallinHotkeyListener); keyManager.unregisterKeyListener(renderselfHotkeyListener); clientToolbar.removeNavigation(navButton); @@ -443,26 +422,6 @@ public class PvpToolsPlugin extends Plugin } } - /** - * Enables or disables the fall in helper feature - */ - private void toggleFallinHelper() - { - if (!fallinHelperEnabled) - { - client.setIsHidingEntities(true); - client.setPlayersHidden(true); - fallinHelperEnabled = true; - } - else - { - client.setIsHidingEntities(false); - client.setPlayersHidden(false); - fallinHelperEnabled = false; - } - - } - /** * Updates the PvP Tools panel with the numbers for enemy protection prayers */ @@ -724,8 +683,6 @@ public class PvpToolsPlugin extends Plugin { this.countPlayers = config.countPlayers(); this.countOverHeads = config.countOverHeads(); - this.fallInHelper = config.fallInHelper(); - this.hotkey = config.hotkey(); this.renderSelf = config.renderSelf(); this.riskCalculatorEnabled = config.riskCalculatorEnabled(); this.missingPlayersEnabled = config.missingPlayersEnabled();