PvPTools: Remove fallinhelper

PvPTools: Remove fallinhelper

was unused, causing crashes
This commit is contained in:
Kyleeld
2019-07-23 00:36:30 +01:00
parent d4d722674a
commit 41e5d55cfe
2 changed files with 0 additions and 91 deletions

View File

@@ -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) <stonewall@thots.cc.usa>, 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;
}
}

View File

@@ -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,7 +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;
@@ -175,17 +170,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 +236,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 +275,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 +423,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,7 +684,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();