diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java
index 152458de73..276be04829 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java
@@ -30,6 +30,7 @@ import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
+import java.awt.Insets;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.ItemEvent;
@@ -49,12 +50,14 @@ import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
+import javax.swing.JComponent;
import javax.swing.JFormattedTextField;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JScrollPane;
+import javax.swing.JSlider;
import javax.swing.JSpinner;
import javax.swing.JTextArea;
import javax.swing.ScrollPaneConstants;
@@ -72,6 +75,7 @@ import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigDescriptor;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
+import net.runelite.client.config.ConfigItemsGroup;
import net.runelite.client.config.ConfigItemDescriptor;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.config.Keybind;
@@ -413,223 +417,279 @@ public class ConfigPanel extends PluginPanel
title.setToolTipText("" + name + ":
" + listItem.getDescription() + "");
topPanel.add(title);
- for (ConfigItemDescriptor cid : cd.getItems())
+ for (ConfigItemsGroup cig : cd.getItemGroups())
{
- if (cid.getItem().hidden())
+ boolean collapsed = false;
+ if (!cig.getGroup().equals(""))
{
+ String header = cig.getGroup();
+
+ JPanel item = new JPanel();
+ item.setLayout(new BorderLayout());
+ item.setMinimumSize(new Dimension(PANEL_WIDTH, 0));
+
+ JLabel headerLabel = new JLabel(header);
+ headerLabel.setForeground(Color.ORANGE);
+ headerLabel.setPreferredSize(new Dimension(PANEL_WIDTH, (int)headerLabel.getPreferredSize().getHeight()));
+ String sCollapsed = configManager.getConfiguration(cd.getGroup().value(), cig.getGroup() + "_collapse");
+
+ if (sCollapsed != null)
+ collapsed = Boolean.parseBoolean(sCollapsed);
+
+ JButton collapse = new JButton(collapsed ? "+" : "-");
+ collapse.setPreferredSize(new Dimension(20, 20));
+ collapse.setFont(collapse.getFont().deriveFont(16.0f));
+ collapse.setBorder(null);
+ collapse.setMargin(new Insets(0, 0, 0, 0));
+ collapse.addActionListener(ae -> changeGroupCollapse(listItem, config, collapse, cd, cig));
+ headerLabel.setBorder(new EmptyBorder(0, 10, 0, 0));
+
+ item.add(collapse, BorderLayout.WEST);
+ item.add(headerLabel, BorderLayout.CENTER);
+
+ mainPanel.add(item);
+ }
+
+ if (collapsed)
continue;
- }
- JPanel item = new JPanel();
- item.setLayout(new BorderLayout());
- item.setMinimumSize(new Dimension(PANEL_WIDTH, 0));
- name = cid.getItem().name();
- JLabel configEntryName = new JLabel(name);
- configEntryName.setForeground(Color.WHITE);
- configEntryName.setToolTipText("" + name + ":
" + cid.getItem().description() + "");
- item.add(configEntryName, BorderLayout.CENTER);
-
- if (cid.getType() == boolean.class)
+ for (ConfigItemDescriptor cid : cig.getItems())
{
- JCheckBox checkbox = new JCheckBox();
- checkbox.setBackground(ColorScheme.LIGHT_GRAY_COLOR);
- checkbox.setSelected(Boolean.parseBoolean(configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName())));
- checkbox.addActionListener(ae -> changeConfiguration(listItem, config, checkbox, cd, cid));
-
- item.add(checkbox, BorderLayout.EAST);
- }
-
- if (cid.getType() == int.class)
- {
- int value = Integer.parseInt(configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName()));
-
- Range range = cid.getRange();
- int min = 0, max = Integer.MAX_VALUE;
- if (range != null)
+ if (cid.getItem().hidden())
{
- min = range.min();
- max = range.max();
+ continue;
}
- // Config may previously have been out of range
- value = Ints.constrainToRange(value, min, max);
+ JPanel item = new JPanel();
+ item.setLayout(new BorderLayout());
+ item.setMinimumSize(new Dimension(PANEL_WIDTH, 0));
+ name = cid.getItem().name();
+ JLabel configEntryName = new JLabel(name);
+ configEntryName.setPreferredSize(new Dimension(PANEL_WIDTH, (int)configEntryName.getPreferredSize().getHeight()));
+ configEntryName.setForeground(Color.WHITE);
+ configEntryName.setToolTipText("" + name + ":
" + cid.getItem().description() + "");
+ item.add(configEntryName, BorderLayout.CENTER);
- SpinnerModel model = new SpinnerNumberModel(value, min, max, 1);
- JSpinner spinner = new JSpinner(model);
- Component editor = spinner.getEditor();
- JFormattedTextField spinnerTextField = ((JSpinner.DefaultEditor) editor).getTextField();
- spinnerTextField.setColumns(SPINNER_FIELD_WIDTH);
- spinner.addChangeListener(ce -> changeConfiguration(listItem, config, spinner, cd, cid));
-
- item.add(spinner, BorderLayout.EAST);
- }
-
- if (cid.getType() == String.class)
- {
- JTextComponent textField;
-
- if (cid.getItem().secret())
+ if (cid.getType() == boolean.class)
{
- textField = new JPasswordField();
- }
- else
- {
- final JTextArea textArea = new JTextArea();
- textArea.setLineWrap(true);
- textArea.setWrapStyleWord(true);
- textField = textArea;
+ JCheckBox checkbox = new JCheckBox();
+ checkbox.setBackground(ColorScheme.LIGHT_GRAY_COLOR);
+ checkbox.setSelected(Boolean.parseBoolean(configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName())));
+ checkbox.addActionListener(ae -> changeConfiguration(listItem, config, checkbox, cd, cid));
+
+ item.add(checkbox, BorderLayout.EAST);
}
- textField.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
- textField.setText(configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName()));
-
- textField.addFocusListener(new FocusAdapter()
+ if (cid.getType() == int.class)
{
- @Override
- public void focusLost(FocusEvent e)
+ int value = Integer.parseInt(configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName()));
+
+ Range range = cid.getRange();
+ int min = 0, max = Integer.MAX_VALUE;
+ if (range != null)
{
- changeConfiguration(listItem, config, textField, cd, cid);
+ min = range.min();
+ max = range.max();
}
- });
- item.add(textField, BorderLayout.SOUTH);
- }
+ // Config may previously have been out of range
+ value = Ints.constrainToRange(value, min, max);
- if (cid.getType() == Color.class)
- {
- String existing = configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName());
-
- Color existingColor;
- JButton colorPickerBtn;
-
- if (existing == null)
- {
- existingColor = Color.BLACK;
- colorPickerBtn = new JButton("Pick a color");
- }
- else
- {
- existingColor = ColorUtil.fromString(existing);
- colorPickerBtn = new JButton(ColorUtil.toHexColor(existingColor).toUpperCase());
- }
-
- colorPickerBtn.setFocusable(false);
- colorPickerBtn.setBackground(existingColor);
- colorPickerBtn.addMouseListener(new MouseAdapter()
- {
- @Override
- public void mouseClicked(MouseEvent e)
+ if (max < Integer.MAX_VALUE)
{
- RuneliteColorPicker colorPicker = new RuneliteColorPicker(SwingUtilities.windowForComponent(ConfigPanel.this),
- colorPickerBtn.getBackground(), cid.getItem().name(), cid.getAlpha() == null);
- colorPicker.setLocation(getLocationOnScreen());
- colorPicker.setOnColorChange(c ->
- {
- colorPickerBtn.setBackground(c);
- colorPickerBtn.setText(ColorUtil.toHexColor(c).toUpperCase());
- });
-
- colorPicker.addWindowListener(new WindowAdapter()
- {
- @Override
- public void windowClosing(WindowEvent e)
+ JSlider slider = new JSlider(min, max, value);
+ configEntryName.setText(name.concat(": ").concat(String.valueOf(slider.getValue())));
+ slider.setPreferredSize(new Dimension(topPanel.getPreferredSize().width, slider.getHeight()));
+ String finalName = name;
+ slider.addChangeListener((l) ->
{
- changeConfiguration(listItem, config, colorPicker, cd, cid);
+ configEntryName.setText(finalName.concat(": ").concat(String.valueOf(slider.getValue())));
+ if (!slider.getValueIsAdjusting())
+ changeConfiguration(listItem, config, slider, cd, cid);
}
- });
- colorPicker.setVisible(true);
+ );
+ item.add(slider, BorderLayout.EAST);
}
- });
-
- item.add(colorPickerBtn, BorderLayout.EAST);
- }
-
- if (cid.getType() == Dimension.class)
- {
- JPanel dimensionPanel = new JPanel();
- dimensionPanel.setLayout(new BorderLayout());
-
- String str = configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName());
- String[] splitStr = str.split("x");
- int width = Integer.parseInt(splitStr[0]);
- int height = Integer.parseInt(splitStr[1]);
-
- SpinnerModel widthModel = new SpinnerNumberModel(width, 0, Integer.MAX_VALUE, 1);
- JSpinner widthSpinner = new JSpinner(widthModel);
- Component widthEditor = widthSpinner.getEditor();
- JFormattedTextField widthSpinnerTextField = ((JSpinner.DefaultEditor) widthEditor).getTextField();
- widthSpinnerTextField.setColumns(4);
-
- SpinnerModel heightModel = new SpinnerNumberModel(height, 0, Integer.MAX_VALUE, 1);
- JSpinner heightSpinner = new JSpinner(heightModel);
- Component heightEditor = heightSpinner.getEditor();
- JFormattedTextField heightSpinnerTextField = ((JSpinner.DefaultEditor) heightEditor).getTextField();
- heightSpinnerTextField.setColumns(4);
-
- ChangeListener listener = e ->
- configManager.setConfiguration(cd.getGroup().value(), cid.getItem().keyName(), widthSpinner.getValue() + "x" + heightSpinner.getValue());
-
- widthSpinner.addChangeListener(listener);
- heightSpinner.addChangeListener(listener);
-
- dimensionPanel.add(widthSpinner, BorderLayout.WEST);
- dimensionPanel.add(new JLabel(" x "), BorderLayout.CENTER);
- dimensionPanel.add(heightSpinner, BorderLayout.EAST);
-
- item.add(dimensionPanel, BorderLayout.EAST);
- }
-
- if (cid.getType().isEnum())
- {
- Class extends Enum> type = (Class extends Enum>) cid.getType();
- JComboBox box = new JComboBox(type.getEnumConstants());
- box.setPreferredSize(new Dimension(box.getPreferredSize().width, 25));
- box.setRenderer(new ComboBoxListRenderer());
- box.setForeground(Color.WHITE);
- box.setFocusable(false);
- box.setPrototypeDisplayValue("XXXXXXXX"); //sorry but this is the way to keep the size of the combobox in check.
- try
- {
- Enum selectedItem = Enum.valueOf(type, configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName()));
- box.setSelectedItem(selectedItem);
- box.setToolTipText(Text.titleCase(selectedItem));
- }
- catch (IllegalArgumentException ex)
- {
- log.debug("invalid seleced item", ex);
- }
- box.addItemListener(e ->
- {
- if (e.getStateChange() == ItemEvent.SELECTED)
+ else
{
- changeConfiguration(listItem, config, box, cd, cid);
- box.setToolTipText(Text.titleCase((Enum) box.getSelectedItem()));
+ SpinnerModel model = new SpinnerNumberModel(value, min, max, 1);
+ JSpinner spinner = new JSpinner(model);
+ Component editor = spinner.getEditor();
+ JFormattedTextField spinnerTextField = ((JSpinner.DefaultEditor) editor).getTextField();
+ spinnerTextField.setColumns(SPINNER_FIELD_WIDTH);
+ spinner.addChangeListener(ce -> changeConfiguration(listItem, config, spinner, cd, cid));
+
+ item.add(spinner, BorderLayout.EAST);
}
- });
- item.add(box, BorderLayout.EAST);
- }
+ }
- if (cid.getType() == Keybind.class || cid.getType() == ModifierlessKeybind.class)
- {
- Keybind startingValue = configManager.getConfiguration(cd.getGroup().value(),
- cid.getItem().keyName(),
- (Class extends Keybind>) cid.getType());
-
- HotkeyButton button = new HotkeyButton(startingValue, cid.getType() == ModifierlessKeybind.class);
-
- button.addFocusListener(new FocusAdapter()
+ if (cid.getType() == String.class)
{
- @Override
- public void focusLost(FocusEvent e)
+ JTextComponent textField;
+
+ if (cid.getItem().secret())
{
- changeConfiguration(listItem, config, button, cd, cid);
+ textField = new JPasswordField();
+ }
+ else
+ {
+ final JTextArea textArea = new JTextArea();
+ textArea.setLineWrap(true);
+ textArea.setWrapStyleWord(true);
+ textField = textArea;
}
- });
- item.add(button, BorderLayout.EAST);
+ textField.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+ textField.setText(configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName()));
+
+ textField.addFocusListener(new FocusAdapter()
+ {
+ @Override
+ public void focusLost(FocusEvent e)
+ {
+ changeConfiguration(listItem, config, textField, cd, cid);
+ }
+ });
+
+ item.add(textField, BorderLayout.SOUTH);
+ }
+
+ if (cid.getType() == Color.class)
+ {
+ String existing = configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName());
+
+ Color existingColor;
+ JButton colorPickerBtn;
+
+ if (existing == null)
+ {
+ existingColor = Color.BLACK;
+ colorPickerBtn = new JButton("Pick a color");
+ }
+ else
+ {
+ existingColor = ColorUtil.fromString(existing);
+ colorPickerBtn = new JButton(ColorUtil.toHexColor(existingColor).toUpperCase());
+ }
+
+ colorPickerBtn.setFocusable(false);
+ colorPickerBtn.setBackground(existingColor);
+ colorPickerBtn.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseClicked(MouseEvent e)
+ {
+ RuneliteColorPicker colorPicker = new RuneliteColorPicker(SwingUtilities.windowForComponent(ConfigPanel.this),
+ colorPickerBtn.getBackground(), cid.getItem().name(), cid.getAlpha() == null);
+ colorPicker.setLocation(getLocationOnScreen());
+ colorPicker.setOnColorChange(c ->
+ {
+ colorPickerBtn.setBackground(c);
+ colorPickerBtn.setText(ColorUtil.toHexColor(c).toUpperCase());
+ });
+
+ colorPicker.addWindowListener(new WindowAdapter()
+ {
+ @Override
+ public void windowClosing(WindowEvent e)
+ {
+ changeConfiguration(listItem, config, colorPicker, cd, cid);
+ }
+ });
+ colorPicker.setVisible(true);
+ }
+ });
+
+ item.add(colorPickerBtn, BorderLayout.EAST);
+ }
+
+ if (cid.getType() == Dimension.class)
+ {
+ JPanel dimensionPanel = new JPanel();
+ dimensionPanel.setLayout(new BorderLayout());
+
+ String str = configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName());
+ String[] splitStr = str.split("x");
+ int width = Integer.parseInt(splitStr[0]);
+ int height = Integer.parseInt(splitStr[1]);
+
+ SpinnerModel widthModel = new SpinnerNumberModel(width, 0, Integer.MAX_VALUE, 1);
+ JSpinner widthSpinner = new JSpinner(widthModel);
+ Component widthEditor = widthSpinner.getEditor();
+ JFormattedTextField widthSpinnerTextField = ((JSpinner.DefaultEditor) widthEditor).getTextField();
+ widthSpinnerTextField.setColumns(4);
+
+ SpinnerModel heightModel = new SpinnerNumberModel(height, 0, Integer.MAX_VALUE, 1);
+ JSpinner heightSpinner = new JSpinner(heightModel);
+ Component heightEditor = heightSpinner.getEditor();
+ JFormattedTextField heightSpinnerTextField = ((JSpinner.DefaultEditor) heightEditor).getTextField();
+ heightSpinnerTextField.setColumns(4);
+
+ ChangeListener listener = e ->
+ configManager.setConfiguration(cd.getGroup().value(), cid.getItem().keyName(), widthSpinner.getValue() + "x" + heightSpinner.getValue());
+
+ widthSpinner.addChangeListener(listener);
+ heightSpinner.addChangeListener(listener);
+
+ dimensionPanel.add(widthSpinner, BorderLayout.WEST);
+ dimensionPanel.add(new JLabel(" x "), BorderLayout.CENTER);
+ dimensionPanel.add(heightSpinner, BorderLayout.EAST);
+
+ item.add(dimensionPanel, BorderLayout.EAST);
+ }
+
+ if (cid.getType().isEnum())
+ {
+ Class extends Enum> type = (Class extends Enum>) cid.getType();
+ JComboBox box = new JComboBox(type.getEnumConstants());
+ box.setPreferredSize(new Dimension(box.getPreferredSize().width, 25));
+ box.setRenderer(new ComboBoxListRenderer());
+ box.setForeground(Color.WHITE);
+ box.setFocusable(false);
+ box.setPrototypeDisplayValue("XXXXXXXX"); //sorry but this is the way to keep the size of the combobox in check.
+ try
+ {
+ Enum selectedItem = Enum.valueOf(type, configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName()));
+ box.setSelectedItem(selectedItem);
+ box.setToolTipText(selectedItem.toString());
+ }
+ catch (IllegalArgumentException ex)
+ {
+ log.debug("invalid seleced item", ex);
+ }
+ box.addItemListener(e ->
+ {
+ if (e.getStateChange() == ItemEvent.SELECTED)
+ {
+ changeConfiguration(listItem, config, box, cd, cid);
+ box.setToolTipText(box.getSelectedItem().toString());
+ }
+ });
+ item.add(box, BorderLayout.EAST);
+ }
+
+ if (cid.getType() == Keybind.class || cid.getType() == ModifierlessKeybind.class)
+ {
+ Keybind startingValue = configManager.getConfiguration(cd.getGroup().value(),
+ cid.getItem().keyName(),
+ (Class extends Keybind>) cid.getType());
+
+ HotkeyButton button = new HotkeyButton(startingValue, cid.getType() == ModifierlessKeybind.class);
+
+ button.addFocusListener(new FocusAdapter()
+ {
+ @Override
+ public void focusLost(FocusEvent e)
+ {
+ changeConfiguration(listItem, config, button, cd, cid);
+ }
+ });
+
+ item.add(button, BorderLayout.EAST);
+ }
+
+ mainPanel.add(item);
}
-
- mainPanel.add(item);
}
JButton resetButton = new JButton("Reset");
@@ -657,6 +717,22 @@ public class ConfigPanel extends PluginPanel
scrollPane.getVerticalScrollBar().setValue(0);
}
+ private void changeGroupCollapse(PluginListItem listItem, Config config, JComponent component, ConfigDescriptor cd, ConfigItemsGroup cig)
+ {
+ if (component instanceof JButton)
+ {
+
+ String sCollapsed = configManager.getConfiguration(cd.getGroup().value(), cig.getGroup() + "_collapse");
+ boolean collapse = true;
+
+ if (sCollapsed != null)
+ collapse = !Boolean.parseBoolean(sCollapsed);
+
+ configManager.setConfiguration(cd.getGroup().value(), cig.getGroup() + "_collapse", collapse);
+ openGroupConfigPanel(listItem, config, cd);
+ }
+ }
+
private void changeConfiguration(PluginListItem listItem, Config config, Component component, ConfigDescriptor cd, ConfigItemDescriptor cid)
{
final ConfigItem configItem = cid.getItem();
@@ -704,6 +780,11 @@ public class ConfigPanel extends PluginPanel
HotkeyButton hotkeyButton = (HotkeyButton) component;
configManager.setConfiguration(cd.getGroup().value(), cid.getItem().keyName(), hotkeyButton.getValue());
}
+ else if (component instanceof JSlider)
+ {
+ JSlider slider = (JSlider) component;
+ configManager.setConfiguration(cd.getGroup().value(), cid.getItem().keyName(), slider.getValue());
+ }
}
void startPlugin(Plugin plugin, PluginListItem listItem)
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/EasyscapeConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/EasyscapeConfig.java
new file mode 100644
index 0000000000..cba9a8baaf
--- /dev/null
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/EasyscapeConfig.java
@@ -0,0 +1,586 @@
+/*
+ * Copyright (c) 2019, Owain van Brakel
+ * Copyright (c) 2019, Alan Baumgartner
+ * 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.easyscape;
+
+import net.runelite.client.config.Config;
+import net.runelite.client.config.ConfigGroup;
+import net.runelite.client.config.ConfigItem;
+import net.runelite.client.plugins.easyscape.util.DuelingRingMode;
+import net.runelite.client.plugins.easyscape.util.EssenceMode;
+import net.runelite.client.plugins.easyscape.util.GamesNecklaceMode;
+import net.runelite.client.plugins.easyscape.util.GloryMode;
+
+
+@ConfigGroup("easyscape")
+public interface EasyscapeConfig extends Config
+{
+ @ConfigItem(
+ keyName = "withdrawOne",
+ name = "Withdraw/Deposit One",
+ description = "",
+ position = 0,
+ group = "Banking"
+ )
+ default boolean getWithdrawOne()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "withdrawOneItems",
+ name = "Items",
+ description = "",
+ position = 1,
+ group = "Banking"
+ )
+ default String getWithdrawOneItems()
+ {
+ return "";
+ }
+
+ @ConfigItem(
+ keyName = "withdrawFive",
+ name = "Withdraw/Deposit Five",
+ description = "",
+ position = 2,
+ group = "Banking"
+ )
+ default boolean getWithdrawFive()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "withdrawFiveItems",
+ name = "Items",
+ description = "",
+ position = 3,
+ group = "Banking"
+ )
+ default String getWithdrawFiveItems()
+ {
+ return "";
+ }
+
+ @ConfigItem(
+ keyName = "withdrawTen",
+ name = "Withdraw/Deposit Ten",
+ description = "",
+ position = 4,
+ group = "Banking"
+ )
+ default boolean getWithdrawTen()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "withdrawTenItems",
+ name = "Items",
+ description = "",
+ position = 5,
+ group = "Banking"
+ )
+ default String getWithdrawTenItems()
+ {
+ return "";
+ }
+
+ @ConfigItem(
+ keyName = "withdrawX",
+ name = "Withdraw/Deposit X",
+ description = "",
+ position = 6,
+ group = "Banking"
+ )
+ default boolean getWithdrawX()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "withdrawXAmount",
+ name = "Amount",
+ description = "",
+ position = 7,
+ group = "Banking"
+ )
+ default String getWithdrawXAmount()
+ {
+ return "";
+ }
+
+ @ConfigItem(
+ keyName = "withdrawXItems",
+ name = "Items",
+ description = "",
+ position = 8,
+ group = "Banking"
+ )
+ default String getWithdrawXItems()
+ {
+ return "";
+ }
+
+ @ConfigItem(
+ keyName = "withdrawAll",
+ name = "Withdraw/Deposit All",
+ description = "",
+ position = 9,
+ group = "Banking"
+ )
+ default boolean getWithdrawAll()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "withdrawAllItems",
+ name = "Items",
+ description = "",
+ position = 10,
+ group = "Banking"
+ )
+ default String getWithdrawAllItems()
+ {
+ return "";
+ }
+
+// ----------------------------------------------------------- //
+
+ @ConfigItem(
+ keyName = "removeObjects",
+ name = "Remove Objects",
+ description = "Removes interaction with the listed objects.",
+ position = 12,
+ group = "Miscellaneous easyscape"
+ )
+ default boolean getRemoveObjects()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "removedObjects",
+ name = "Objects",
+ description = "Objects listed here will have all interaction be removed.",
+ position = 13,
+ group = "Miscellaneous easyscape"
+ )
+ default String getRemovedObjects()
+ {
+ return "";
+ }
+
+// ----------------------------------------------------------- //
+
+ @ConfigItem(
+ keyName = "swapBuyOne",
+ name = "Swappable Buy One",
+ description = "",
+ position = 14,
+ group = "Shop / stores"
+ )
+ default boolean getSwapBuyOne()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "buyOneItems",
+ name = "Items",
+ description = "",
+ position = 15,
+ group = "Shop / stores"
+ )
+ default String getBuyOneItems()
+ {
+ return "";
+ }
+
+ @ConfigItem(
+ keyName = "swapBuyFive",
+ name = "Swappable Buy Five",
+ description = "",
+ position = 16,
+ group = "Shop / stores"
+ )
+ default boolean getSwapBuyFive()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "buyFiveItems",
+ name = "Items",
+ description = "",
+ position = 17,
+ group = "Shop / stores"
+ )
+ default String getBuyFiveItems()
+ {
+ return "";
+ }
+
+ @ConfigItem(
+ keyName = "swapBuyTen",
+ name = "Swappable Buy Ten",
+ description = "",
+ position = 18,
+ group = "Shop / stores"
+ )
+ default boolean getSwapBuyTen()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "buyTenItems",
+ name = "Items",
+ description = "",
+ position = 19,
+ group = "Shop / stores"
+ )
+ default String getBuyTenItems()
+ {
+ return "";
+ }
+
+ @ConfigItem(
+ keyName = "swapBuyFifty",
+ name = "Swappable Buy Fifty",
+ description = "",
+ position = 20,
+ group = "Shop / stores"
+ )
+ default boolean getSwapBuyFifty()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "buyFiftyItems",
+ name = "Items",
+ description = "",
+ position = 21,
+ group = "Shop / stores"
+ )
+ default String getBuyFiftyItems()
+ {
+ return "";
+ }
+
+ @ConfigItem(
+ keyName = "swapSellOne",
+ name = "Swappable Sell One",
+ description = "",
+ position = 22,
+ group = "Shop / stores"
+ )
+ default boolean getSwapSellOne()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "sellOneItems",
+ name = "Items",
+ description = "",
+ position = 23,
+ group = "Shop / stores"
+ )
+ default String getSellOneItems()
+ {
+ return "";
+ }
+
+ @ConfigItem(
+ keyName = "swapSellFive",
+ name = "Swappable Sell Five",
+ description = "",
+ position = 24,
+ group = "Shop / stores"
+ )
+ default boolean getSwapSellFive()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "sellFiveItems",
+ name = "Items",
+ description = "",
+ position = 25,
+ group = "Shop / stores"
+ )
+ default String getSellFiveItems()
+ {
+ return "";
+ }
+
+ @ConfigItem(
+ keyName = "swapSellTen",
+ name = "Swappable Sell Ten",
+ description = "",
+ position = 26,
+ group = "Shop / stores"
+ )
+ default boolean getSwapSellTen()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "sellTenItems",
+ name = "Items",
+ description = "",
+ position = 27,
+ group = "Shop / stores"
+ )
+ default String getSellTenItems()
+ {
+ return "";
+ }
+
+ @ConfigItem(
+ keyName = "swapSellFifty",
+ name = "Swappable Sell Fifty",
+ description = "",
+ position = 28,
+ group = "Shop / stores"
+ )
+ default boolean getSwapSellFifty()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "sellFiftyItems",
+ name = "Items",
+ description = "",
+ position = 29,
+ group = "Shop / stores"
+ )
+ default String getSellFiftyItems()
+ {
+ return "";
+ }
+
+// ----------------------------------------------------------- //
+
+ @ConfigItem(
+ keyName = "easyConstruction",
+ name = "Easy Construction",
+ description = "Makes \"Remove\" the default option for listed items in build mode.",
+ position = 30,
+ group = "Miscellaneous swapper"
+ )
+ default boolean getEasyConstruction()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "constructionItems",
+ name = "Construction Items",
+ description = "Items listed here will have the default option set to \"Removed\" in build mode.",
+ position = 31,
+ group = "Miscellaneous swapper"
+ )
+ default String getConstructionItems()
+ {
+ return "";
+ }
+
+
+ @ConfigItem(
+ keyName = "swapSmithing",
+ name = "Swap Smithing",
+ description = "Enables swapping of smith-1 and smith-all options.",
+ position = 32,
+ group = "Miscellaneous swapper"
+ )
+ default boolean getSwapSmithing()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "swapTanning",
+ name = "Swap Tanning",
+ description = "Enables swapping of tan-1 and tan-all options.",
+ position = 33,
+ group = "Miscellaneous swapper"
+ )
+ default boolean getSwapTanning()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "swapArdougneCape",
+ name = "Swap Ardougne Cape",
+ description = "Enables swapping of teleport and wear.",
+ position = 34,
+ group = "Miscellaneous swapper"
+ )
+ default boolean getSwapArdougneCape()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "swapSawmill",
+ name = "Swap Sawmill Operator",
+ description = "Makes Buy-plank the default option on the sawmill operator.",
+ position = 35,
+ group = "Miscellaneous swapper"
+ )
+ default boolean getSwapSawmill()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "swapSawmillPlanks",
+ name = "Swap Buy Planks",
+ description = "Makes Buy All the default option in buy planks.",
+ position = 36,
+ group = "Miscellaneous swapper"
+ )
+ default boolean getSwapSawmillPlanks()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "swapPuroPuro",
+ name = "Swap Puro Puro Wheat",
+ description = "",
+ position = 37,
+ group = "Miscellaneous swapper"
+ )
+ default boolean getSwapPuro()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "swapEssencePounch",
+ name = "Swap Essence Pouch",
+ description = "",
+ position = 38,
+ group = "Miscellaneous swapper"
+ )
+ default boolean getSwapEssencePouch()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "essenceMode",
+ name = "Mode",
+ description = "",
+ position = 39,
+ group = "Miscellaneous swapper"
+ )
+ default EssenceMode getEssenceMode()
+ {
+ return EssenceMode.RUNECRAFTING;
+ }
+
+ @ConfigItem(
+ keyName = "swapGamesNecklace",
+ name = "Swap Games Necklace",
+ description = "",
+ position = 40,
+ group = "Miscellaneous swapper"
+ )
+ default boolean getGamesNecklace()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "gamesNecklaceMode",
+ name = "Mode",
+ description = "",
+ position = 41,
+ group = "Miscellaneous swapper"
+ )
+ default GamesNecklaceMode getGamesNecklaceMode()
+ {
+ return GamesNecklaceMode.BURTHORPE;
+ }
+
+ @ConfigItem(
+ keyName = "swapDuelingRing",
+ name = "Swap Dueling Ring",
+ description = "",
+ position = 42,
+ group = "Miscellaneous swapper"
+ )
+ default boolean getDuelingRing()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "duelingRingMode",
+ name = "Mode",
+ description = "",
+ position = 43,
+ group = "Miscellaneous swapper"
+ )
+ default DuelingRingMode getDuelingRingMode()
+ {
+ return DuelingRingMode.DUEL_ARENA;
+ }
+
+ @ConfigItem(
+ keyName = "swapGlory",
+ name = "Swap Glory",
+ description = "",
+ position = 44,
+ group = "Miscellaneous swapper"
+ )
+ default boolean getGlory()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "gloryMode",
+ name = "Mode",
+ description = "",
+ position = 45,
+ group = "Miscellaneous swapper"
+ )
+ default GloryMode getGloryMode()
+ {
+ return GloryMode.EDGEVILLE;
+ }
+}
\ No newline at end of file
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/EasyscapePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/EasyscapePlugin.java
index 35e942382c..41476f163f 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/EasyscapePlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/EasyscapePlugin.java
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 2018, https://runelitepl.us
+ * Copyright (c) 2019, Owain van Brakel
+ * Copyright (c) 2019, Alan Baumgartner
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,15 +27,18 @@ package net.runelite.client.plugins.easyscape;
import com.google.inject.Provides;
import javax.inject.Inject;
-import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client;
+import net.runelite.api.GameObject;
import net.runelite.api.GameState;
import net.runelite.api.MenuAction;
import static net.runelite.api.MenuAction.MENU_ACTION_DEPRIORITIZE_OFFSET;
import static net.runelite.api.MenuAction.WALK;
import net.runelite.api.MenuEntry;
+import static net.runelite.api.ObjectID.PORTAL_4525;
import net.runelite.api.Player;
import net.runelite.api.coords.WorldPoint;
+import net.runelite.api.events.GameObjectDespawned;
+import net.runelite.api.events.GameObjectSpawned;
import net.runelite.api.events.MenuEntryAdded;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
@@ -50,49 +54,30 @@ import org.apache.commons.lang3.ArrayUtils;
@PluginDescriptor(
name = "Easyscape",
- description = "Easyscape.",
- tags = {"Easyscape"},
- enabledByDefault = false,
type = PluginType.UTILITY
)
-
-@Slf4j
public class EasyscapePlugin extends Plugin
{
-
private static final int PURO_PURO_REGION_ID = 10307;
- private static final int HOUSE_REGION_ID = 7513;
private MenuEntry[] entries;
+ private boolean inHouse = false;
@Inject
private Client client;
@Inject
- private EasyscapePluginConfig config;
+ private EasyscapeConfig config;
@Provides
- EasyscapePluginConfig provideConfig(ConfigManager configManager)
+ EasyscapeConfig provideConfig(ConfigManager configManager)
{
- return configManager.getConfig(EasyscapePluginConfig.class);
- }
-
- @Override
- public void startUp()
- {
- log.debug("Easyscape Started.");
- }
-
- @Override
- public void shutDown()
- {
- log.debug("Easyscape Stopped.");
+ return configManager.getConfig(EasyscapeConfig.class);
}
@Subscribe
public void onMenuEntryAdded(MenuEntryAdded event)
{
-
if (client.getGameState() != GameState.LOGGED_IN)
{
return;
@@ -111,17 +96,159 @@ public class EasyscapePlugin extends Plugin
entries = client.getMenuEntries();
- if (config.getRemoveExamine())
- {
- for (int i = entries.length - 1; i >= 0; i--)
+ Widget widgetBankTitleBar = client.getWidget(WidgetInfo.BANK_TITLE_BAR);
+
+ if (config.getWithdrawOne())
{
- if (entries[i].getOption().equals("Examine"))
+ for (String item : config.getWithdrawOneItems().split(","))
{
- entries = ArrayUtils.remove(entries, i);
- i--;
+ item = item.trim();
+ if (target.equalsIgnoreCase(item))
+ {
+ swap(client, "Withdraw-1", option, target);
+ swap(client, "Deposit-1", option, target);
+ }
+ }
+ }
+
+ if (config.getWithdrawFive())
+ {
+ for (String item : config.getWithdrawFiveItems().split(","))
+ {
+ item = item.trim();
+ if (target.equalsIgnoreCase(item))
+ {
+ swap(client, "Withdraw-5", option, target);
+ swap(client, "Deposit-5", option, target);
+ }
+ }
+ }
+
+ if (config.getWithdrawTen())
+ {
+ for (String item : config.getWithdrawTenItems().split(","))
+ {
+ item = item.trim();
+ if (target.equalsIgnoreCase(item))
+ {
+ swap(client, "Withdraw-10", option, target);
+ swap(client, "Deposit-10", option, target);
+ }
+ }
+ }
+
+ if (config.getWithdrawX())
+ {
+ for (String item : config.getWithdrawXItems().split(","))
+ {
+ item = item.trim();
+ if (target.equalsIgnoreCase(item))
+ {
+ swap(client, "Withdraw-" + config.getWithdrawXAmount(), option, target);
+ swap(client, "Deposit-" + config.getWithdrawXAmount(), option, target);
+ }
+ }
+ }
+
+ if (config.getWithdrawAll())
+ {
+ for (String item : config.getWithdrawAllItems().split(","))
+ {
+ item = item.trim();
+ if (target.equalsIgnoreCase(item))
+ {
+ swap(client, "Withdraw-All", option, target);
+ swap(client, "Deposit-All", option, target);
+ }
+ }
+ }
+
+ if (config.getSwapBuyOne() && !config.getBuyOneItems().equals(""))
+ {
+ for (String item : config.getBuyOneItems().split(","))
+ {
+ if (target.equalsIgnoreCase(item.trim()))
+ {
+ swap(client, "Buy 1", option, target);
+ }
+ }
+ }
+
+ if (config.getSwapBuyFive() && !config.getBuyFiveItems().equals(""))
+ {
+ for (String item : config.getBuyFiveItems().split(","))
+ {
+ if (target.equalsIgnoreCase(item.trim()))
+ {
+ swap(client, "Buy 5", option, target);
+ }
+ }
+ }
+
+ if (config.getSwapBuyTen() && !config.getBuyTenItems().equals(""))
+ {
+ for (String item : config.getBuyTenItems().split(","))
+ {
+ if (target.equalsIgnoreCase(item.trim()))
+ {
+ swap(client, "Buy 10", option, target);
+ }
+ }
+ }
+
+ if (config.getSwapBuyFifty() && !config.getBuyFiftyItems().equals(""))
+ {
+ for (String item : config.getBuyFiftyItems().split(","))
+ {
+ if (target.equalsIgnoreCase(item.trim()))
+ {
+ swap(client, "Buy 50", option, target);
+ }
+ }
+ }
+
+ if (config.getSwapSellOne() && !config.getSellOneItems().equals(""))
+ {
+ for (String item : config.getSellOneItems().split(","))
+ {
+ if (target.equalsIgnoreCase(item.trim()))
+ {
+ swap(client, "Sell 1", option, target);
+ }
+ }
+ }
+
+ if (config.getSwapSellFive() && !config.getSellFiveItems().equals(""))
+ {
+ for (String item : config.getSellFiveItems().split(","))
+ {
+ if (target.equalsIgnoreCase(item.trim()))
+ {
+ swap(client, "Sell 5", option, target);
+ }
+ }
+ }
+
+ if (config.getSwapSellTen() && !config.getSellTenItems().equals(""))
+ {
+ for (String item : config.getSellTenItems().split(","))
+ {
+ if (target.equalsIgnoreCase(item.trim()))
+ {
+ swap(client, "Sell 10", option, target);
+ }
+ }
+ }
+
+ if (config.getSwapSellFifty() && !config.getSellFiftyItems().equals(""))
+ {
+ for (String item : config.getSellFiftyItems().split(","))
+ {
+ if (target.equalsIgnoreCase(item.trim()))
+ {
+ swap(client, "Sell 50", option, target);
}
}
- client.setMenuEntries(entries);
}
if (config.getRemoveObjects() && !config.getRemovedObjects().equals(""))
@@ -129,7 +256,11 @@ public class EasyscapePlugin extends Plugin
for (String removed : config.getRemovedObjects().split(","))
{
removed = removed.trim();
- if (target.contains("->"))
+ if (target.contains("(") && target.split(" \\(")[0].equalsIgnoreCase(removed))
+ {
+ delete(event.getIdentifier());
+ }
+ else if (target.contains("->"))
{
String trimmed = target.split("->")[1].trim();
if (trimmed.length() >= removed.length() && trimmed.substring(0, removed.length()).equalsIgnoreCase(removed))
@@ -138,7 +269,7 @@ public class EasyscapePlugin extends Plugin
break;
}
}
- if (target.length() >= removed.length() && target.substring(0, removed.length()).equalsIgnoreCase(removed))
+ else if (target.length() >= removed.length() && target.substring(0, removed.length()).equalsIgnoreCase(removed))
{
delete(event.getIdentifier());
break;
@@ -152,7 +283,6 @@ public class EasyscapePlugin extends Plugin
{
MenuEntry menuEntry = entries[entries.length - 1];
menuEntry.setType(MenuAction.WALK.getId() + MENU_ACTION_DEPRIORITIZE_OFFSET);
- client.setMenuEntries(entries);
}
else if (option.equalsIgnoreCase("examine"))
{
@@ -164,13 +294,12 @@ public class EasyscapePlugin extends Plugin
}
}
- if (config.getEasyConstruction() && !config.getConstructionItems().equals(""))
+ if (config.getEasyConstruction() && !config.getConstructionItems().equals("") && inHouse)
{
if (event.getType() == WALK.getId())
{
MenuEntry menuEntry = entries[entries.length - 1];
menuEntry.setType(MenuAction.WALK.getId() + MENU_ACTION_DEPRIORITIZE_OFFSET);
- client.setMenuEntries(entries);
}
swap(client, "Build", option, target);
@@ -193,17 +322,6 @@ public class EasyscapePlugin extends Plugin
client.setMenuEntries(entries);
}
- if (config.getSwapShop() && !config.getSwappedItems().equals(""))
- {
- for (String item : config.getSwappedItems().split(","))
- {
- if (target.equalsIgnoreCase(item.trim()))
- {
- swap(client, "Buy 50", option, target);
- }
- }
- }
-
if (config.getSwapSmithing())
{
if (option.equalsIgnoreCase("Smith 1"))
@@ -221,11 +339,6 @@ public class EasyscapePlugin extends Plugin
swap(client, "Tan All", option, target);
}
- if (config.getSwapCrafting() && option.equalsIgnoreCase("Make-1"))
- {
- swap(client, "Make-All", option, target);
- }
-
if (config.getSwapSawmill() && target.equalsIgnoreCase("Sawmill operator"))
{
swap(client, "Buy-plank", option, target);
@@ -236,12 +349,7 @@ public class EasyscapePlugin extends Plugin
swap(client, "Buy All", option, target);
}
- if (config.getSwapStairs() && option.equalsIgnoreCase("Climb Stairs"))
- {
- swap(client, "Climb Up Stairs", option, target);
- }
-
- if (option.equalsIgnoreCase("Clear-All") && target.equalsIgnoreCase("Bank Filler"))
+ if (option.equalsIgnoreCase("Clear-All") && target.equalsIgnoreCase("bank Filler"))
{
swap(client, "Clear", option, target);
}
@@ -256,7 +364,6 @@ public class EasyscapePlugin extends Plugin
{
if (isEssencePouch(target))
{
- Widget widgetBankTitleBar = client.getWidget(WidgetInfo.BANK_TITLE_BAR);
switch (config.getEssenceMode())
{
case RUNECRAFTING:
@@ -289,26 +396,7 @@ public class EasyscapePlugin extends Plugin
{
if (target.toLowerCase().contains("games necklace"))
{
- switch (config.getGamesNecklaceMode())
- {
- case BURTHORPE:
- swap(client, GamesNecklaceMode.BURTHORPE.toString(), option, target);
- break;
- case BARBARIAN_OUTPOST:
- swap(client, GamesNecklaceMode.BARBARIAN_OUTPOST.toString(), option, target);
- break;
- case CORPOREAL_BEAST:
- swap(client, GamesNecklaceMode.CORPOREAL_BEAST.toString(), option, target);
- break;
- case TEARS_OF_GUTHIX:
- swap(client, GamesNecklaceMode.TEARS_OF_GUTHIX.toString(), option, target);
- break;
- case WINTERTODT:
- swap(client, GamesNecklaceMode.WINTERTODT.toString(), option, target);
- break;
- default:
- break;
- }
+ swap(client, config.getGamesNecklaceMode().toString(), option, target);
}
}
@@ -316,44 +404,7 @@ public class EasyscapePlugin extends Plugin
{
if (target.toLowerCase().contains("ring of dueling"))
{
- switch (config.getDuelingRingMode())
- {
- case DUEL_ARENA:
- swap(client, DuelingRingMode.DUEL_ARENA.toString(), option, target);
- break;
- case CASTLE_WARS:
- swap(client, DuelingRingMode.CASTLE_WARS.toString(), option, target);
- break;
- case CLAN_WARS:
- swap(client, DuelingRingMode.CLAN_WARS.toString(), option, target);
- break;
- default:
- break;
- }
- }
- }
-
- if (config.getWealthRing())
- {
- if (target.toLowerCase().contains("ring of wealth"))
- {
- switch (config.getWealthRingMode())
- {
- case MISCELLANIA:
- swap(client, WealthRingMode.MISCELLANIA.toString(), option, target);
- break;
- case GRAND_EXCHANGE:
- swap(client, WealthRingMode.GRAND_EXCHANGE.toString(), option, target);
- break;
- case FALADOR:
- swap(client, WealthRingMode.FALADOR.toString(), option, target);
- break;
- case DONDAKAN:
- swap(client, WealthRingMode.DONDAKAN.toString(), option, target);
- break;
- default:
- break;
- }
+ swap(client, config.getDuelingRingMode().toString(), option, target);
}
}
@@ -361,37 +412,9 @@ public class EasyscapePlugin extends Plugin
{
if (target.toLowerCase().contains("amulet of glory") || target.toLowerCase().contains("amulet of eternal glory"))
{
- switch (config.getGloryMode())
- {
- case EDGEVILLE:
- swap(client, GloryMode.EDGEVILLE.toString(), option, target);
- break;
- case KARAMJA:
- swap(client, GloryMode.KARAMJA.toString(), option, target);
- break;
- case DRAYNOR_VILLAGE:
- swap(client, GloryMode.DRAYNOR_VILLAGE.toString(), option, target);
- break;
- case AL_KHARID:
- swap(client, GloryMode.AL_KHARID.toString(), option, target);
- break;
- default:
- break;
- }
+ swap(client, config.getGloryMode().toString(), option, target);
}
}
-
- if (target.toLowerCase().contains("crafting cape") && config.getSwapCraftingCape())
- {
- swap(client, "Teleport", option, target);
-
- }
-
- if (target.toLowerCase().contains("construct. cape") && config.getSwapConstructionCape())
- {
- swap(client, "Tele to poh", option, target);
-
- }
}
private void delete(int target)
@@ -409,12 +432,30 @@ public class EasyscapePlugin extends Plugin
private boolean isEssencePouch(String target)
{
- return (target.equalsIgnoreCase("Small Pouch") || target.equalsIgnoreCase("Medium Pouch") || target.equalsIgnoreCase("Large Pouch") || target.equalsIgnoreCase("Giant Pouch"));
+ return (target.equalsIgnoreCase("Small Pouch") ||
+ target.equalsIgnoreCase("Medium Pouch") ||
+ target.equalsIgnoreCase("Large Pouch") ||
+ target.equalsIgnoreCase("Giant Pouch"));
}
- private boolean isHouse()
+ @Subscribe
+ public void onGameObjectSpawned(GameObjectSpawned event)
{
- return client.getMapRegions()[0] == HOUSE_REGION_ID;
+ final GameObject gameObject = event.getGameObject();
+ if (PORTAL_4525 == gameObject.getId())
+ {
+ this.inHouse = true;
+ }
+ }
+
+ @Subscribe
+ public void onGameObjectDespawned(GameObjectDespawned event)
+ {
+ final GameObject gameObject = event.getGameObject();
+ if (PORTAL_4525 == gameObject.getId())
+ {
+ this.inHouse = false;
+ }
}
private boolean isPuroPuro()
@@ -431,5 +472,4 @@ public class EasyscapePlugin extends Plugin
return location.getRegionID() == PURO_PURO_REGION_ID;
}
}
-
-}
+}
\ No newline at end of file
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/EasyscapePluginConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/EasyscapePluginConfig.java
deleted file mode 100644
index ac0f61b361..0000000000
--- a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/EasyscapePluginConfig.java
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * Copyright (c) 2018, https://runelitepl.us
- * 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.easyscape;
-
-import net.runelite.client.config.Config;
-import net.runelite.client.config.ConfigGroup;
-import net.runelite.client.config.ConfigItem;
-
-@ConfigGroup("easyscape")
-public interface EasyscapePluginConfig extends Config
-{
-
- @ConfigItem(
- keyName = "removeExamine",
- name = "Remove Examine",
- description = "",
- position = 0
- )
- default boolean getRemoveExamine()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "swapShop",
- name = "Easy Shop",
- description = "Enables swapping of items in the shop with their buy-50 option.",
- position = 1
- )
- default boolean getSwapShop()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "swappedItems",
- name = "Shop Items",
- description = "Items listed here will have their value and buy-50 options swapped.",
- position = 2
- )
- default String getSwappedItems()
- {
- return "";
- }
-
- @ConfigItem(
- keyName = "easyConstruction",
- name = "Easy Construction",
- description = "",
- position = 3
- )
-
- default boolean getEasyConstruction()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "constructionItems",
- name = "Construction Items",
- description = "",
- position = 4
- )
-
- default String getConstructionItems()
- {
- return "";
- }
-
- @ConfigItem(
- keyName = "removeObjects",
- name = "Remove Objects",
- description = "",
- position = 5
- )
- default boolean getRemoveObjects()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "removedObjects",
- name = "Removed Objects",
- description = "",
- position = 6
- )
- default String getRemovedObjects()
- {
- return "";
- }
-
- @ConfigItem(
- keyName = "swapSmithing",
- name = "Swap Smithing",
- description = "Enables swapping of smith-1 and smith-all options.",
- position = 7
- )
- default boolean getSwapSmithing()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "swapTanning",
- name = "Swap Tanning",
- description = "Enables swapping of tan-1 and tan-all options.",
- position = 8
- )
- default boolean getSwapTanning()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "swapCrafting",
- name = "Swap Crafting",
- description = "",
- position = 9
- )
- default boolean getSwapCrafting()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "swapArdougneCape",
- name = "Swap Ardougne Cape",
- description = "Enables swapping of teleport and wear.",
- position = 10
- )
- default boolean getSwapArdougneCape()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "swapStairs",
- name = "Swap Stairs",
- description = "",
- position = 11
- )
-
- default boolean getSwapStairs()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "swapSawmill",
- name = "Swap Sawmill Operator",
- description = "",
- position = 12
- )
- default boolean getSwapSawmill()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "swapSawmillPlanks",
- name = "Swap Buy Planks",
- description = "",
- position = 13
- )
-
- default boolean getSwapSawmillPlanks()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "swapPuroPuro",
- name = "Swap Puro Puro Wheat",
- description = "",
- position = 14
- )
- default boolean getSwapPuro()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "swapEssencePounch",
- name = "Swap Essence Pouch",
- description = "Enables swapping of fill and empty for essence pounch.",
- position = 15
- )
- default boolean getSwapEssencePouch()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "essenceMode",
- name = "Essence Pouch Mode",
- description = "Runecrafting or essence mining mode.",
- position = 16
- )
-
- default EssenceMode getEssenceMode()
- {
- return EssenceMode.RUNECRAFTING;
- }
-
- @ConfigItem(
- keyName = "swapGamesNecklace",
- name = "Swap Games Necklace",
- description = "Enables swapping of games necklace.",
- position = 17
- )
- default boolean getGamesNecklace()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "gamesNecklaceMode",
- name = "Games Necklace Mode",
- description = "Teleport location mode.",
- position = 18
- )
-
- default GamesNecklaceMode getGamesNecklaceMode()
- {
- return GamesNecklaceMode.BURTHORPE;
- }
-
- @ConfigItem(
- keyName = "swapDuelingRing",
- name = "Swap Dueling Ring",
- description = "Enables swapping of dueling ring.",
- position = 19
- )
- default boolean getDuelingRing()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "duelingRingMode",
- name = "Dueling Ring Mode",
- description = "Teleport location mode.",
- position = 20
- )
-
- default DuelingRingMode getDuelingRingMode()
- {
- return DuelingRingMode.DUEL_ARENA;
- }
-
- @ConfigItem(
- keyName = "swapGlory",
- name = "Swap Glory",
- description = "Enables swapping of Amulet of Glory.",
- position = 21
- )
- default boolean getGlory()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "gloryMode",
- name = "Glory Mode",
- description = "Teleport location mode.",
- position = 22
- )
-
- default GloryMode getGloryMode()
- {
- return GloryMode.EDGEVILLE;
- }
-
- @ConfigItem(
- keyName = "swapWealthRing",
- name = "Swap Ring of Wealth",
- description = "Enables swapping of Ring of Wealth.",
- position = 23
- )
- default boolean getWealthRing()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "WealthRingMode",
- name = "Wealth Ring Mode",
- description = "Teleport location mode.",
- position = 24
- )
-
- default WealthRingMode getWealthRingMode()
- {
- return WealthRingMode.GRAND_EXCHANGE;
- }
-
- @ConfigItem(
- keyName = "swapConstructionCape",
- name = "Swap Construction Cape",
- description = "Enables swapping of teleport and wear.",
- position = 25
- )
- default boolean getSwapConstructionCape()
- {
- return true;
- }
-
- @ConfigItem(
- keyName = "swapCraftingCape",
- name = "Swap Crafting Cape",
- description = "Enables swapping of teleport and wear.",
- position = 26
- )
- default boolean getSwapCraftingCape()
- {
- return true;
- }
-}
-
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/WealthRingMode.java b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/WealthRingMode.java
deleted file mode 100644
index 525aa5ee3c..0000000000
--- a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/WealthRingMode.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2018, https://runelitepl.us
- * 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.easyscape;
-
-public enum WealthRingMode
-{
- MISCELLANIA("Miscellania"),
- GRAND_EXCHANGE("Grand Exchange"),
- FALADOR("Falador"),
- DONDAKAN("Dondakan");
-
- private final String name;
-
- WealthRingMode(String name)
- {
- this.name = name;
- }
-
- @Override
- public String toString()
- {
- return name;
- }
-}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/DuelingRingMode.java b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/util/DuelingRingMode.java
similarity index 91%
rename from runelite-client/src/main/java/net/runelite/client/plugins/easyscape/DuelingRingMode.java
rename to runelite-client/src/main/java/net/runelite/client/plugins/easyscape/util/DuelingRingMode.java
index 1cb3651b5b..c3862fc8eb 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/DuelingRingMode.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/util/DuelingRingMode.java
@@ -1,45 +1,45 @@
-/*
- * Copyright (c) 2018, https://runelitepl.us
- * 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.easyscape;
-
-public enum DuelingRingMode
-{
- DUEL_ARENA("Duel Arena"),
- CASTLE_WARS("Castle Wars"),
- CLAN_WARS("Clan Wars");
-
- private final String name;
-
- DuelingRingMode(String name)
- {
- this.name = name;
- }
-
- @Override
- public String toString()
- {
- return name;
- }
-}
+/*
+ * Copyright (c) 2019, Alan Baumgartner
+ * 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.easyscape.util;
+
+public enum DuelingRingMode
+{
+ DUEL_ARENA("Duel Arena"),
+ CASTLE_WARS("Castle Wars"),
+ CLAN_WARS("Clan Wars");
+
+ private final String name;
+
+ DuelingRingMode(String name)
+ {
+ this.name = name;
+ }
+
+ @Override
+ public String toString()
+ {
+ return name;
+ }
+}
\ No newline at end of file
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/EssenceMode.java b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/util/EssenceMode.java
similarity index 91%
rename from runelite-client/src/main/java/net/runelite/client/plugins/easyscape/EssenceMode.java
rename to runelite-client/src/main/java/net/runelite/client/plugins/easyscape/util/EssenceMode.java
index fe001dbea4..57f37b7ae5 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/EssenceMode.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/util/EssenceMode.java
@@ -1,44 +1,44 @@
-/*
- * Copyright (c) 2018, https://runelitepl.us
- * 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.easyscape;
-
-public enum EssenceMode
-{
- RUNECRAFTING("Runecrafting"),
- ESSENCE_MINING("Essence Mining");
-
- private final String name;
-
- EssenceMode(String name)
- {
- this.name = name;
- }
-
- @Override
- public String toString()
- {
- return name;
- }
-}
+/*
+ * Copyright (c) 2019, Alan Baumgartner
+ * 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.easyscape.util;
+
+public enum EssenceMode
+{
+ RUNECRAFTING("Runecrafting"),
+ ESSENCE_MINING("Essence Mining");
+
+ private final String name;
+
+ EssenceMode(String name)
+ {
+ this.name = name;
+ }
+
+ @Override
+ public String toString()
+ {
+ return name;
+ }
+}
\ No newline at end of file
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/GamesNecklaceMode.java b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/util/GamesNecklaceMode.java
similarity index 92%
rename from runelite-client/src/main/java/net/runelite/client/plugins/easyscape/GamesNecklaceMode.java
rename to runelite-client/src/main/java/net/runelite/client/plugins/easyscape/util/GamesNecklaceMode.java
index 457fc100bc..0f4abfb9a6 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/GamesNecklaceMode.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/util/GamesNecklaceMode.java
@@ -1,47 +1,47 @@
-/*
- * Copyright (c) 2018, https://runelitepl.us
- * 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.easyscape;
-
-public enum GamesNecklaceMode
-{
- BURTHORPE("Burthorpe"),
- BARBARIAN_OUTPOST("Barbarian Outpost"),
- CORPOREAL_BEAST("Corporeal Beast"),
- TEARS_OF_GUTHIX("Tears of Guthix"),
- WINTERTODT("Wintertodt Camp");
-
- private final String name;
-
- GamesNecklaceMode(String name)
- {
- this.name = name;
- }
-
- @Override
- public String toString()
- {
- return name;
- }
-}
+/*
+ * Copyright (c) 2019, Alan Baumgartner
+ * 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.easyscape.util;
+
+public enum GamesNecklaceMode
+{
+ BURTHORPE("Burthorpe"),
+ BARBARIAN_OUTPOST("Barbarian Outpost"),
+ CORPOREAL_BEAST("Corporeal Beast"),
+ TEARS_OF_GUTHIX("Tears of Guthix"),
+ WINTERTODT("Wintertodt Camp");
+
+ private final String name;
+
+ GamesNecklaceMode(String name)
+ {
+ this.name = name;
+ }
+
+ @Override
+ public String toString()
+ {
+ return name;
+ }
+}
\ No newline at end of file
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/GloryMode.java b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/util/GloryMode.java
similarity index 91%
rename from runelite-client/src/main/java/net/runelite/client/plugins/easyscape/GloryMode.java
rename to runelite-client/src/main/java/net/runelite/client/plugins/easyscape/util/GloryMode.java
index f160c41c56..f3629af6cb 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/GloryMode.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/easyscape/util/GloryMode.java
@@ -1,46 +1,46 @@
-/*
- * Copyright (c) 2018, https://runelitepl.us
- * 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.easyscape;
-
-public enum GloryMode
-{
- EDGEVILLE("Edgeville"),
- KARAMJA("Karamja"),
- DRAYNOR_VILLAGE("Draynor Village"),
- AL_KHARID("Al Kharid");
-
- private final String name;
-
- GloryMode(String name)
- {
- this.name = name;
- }
-
- @Override
- public String toString()
- {
- return name;
- }
-}
+/*
+ * Copyright (c) 2019, Alan Baumgartner
+ * 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.easyscape.util;
+
+public enum GloryMode
+{
+ EDGEVILLE("Edgeville"),
+ KARAMJA("Karamja"),
+ DRAYNOR_VILLAGE("Draynor Village"),
+ AL_KHARID("Al Kharid");
+
+ private final String name;
+
+ GloryMode(String name)
+ {
+ this.name = name;
+ }
+
+ @Override
+ public String toString()
+ {
+ return name;
+ }
+}
\ No newline at end of file