Merge pull request #3212 from open-osrs/upstream-0506
This commit is contained in:
@@ -101,11 +101,22 @@ public interface BankConfig extends Config
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "rightClickPlaceholders",
|
||||||
|
name = "Disable left click placeholders button",
|
||||||
|
description = "Configures whether the placeholders button will be toggled on left click",
|
||||||
|
position = 7
|
||||||
|
)
|
||||||
|
default boolean rightClickPlaceholders()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "seedVaultValue",
|
keyName = "seedVaultValue",
|
||||||
name = "Show seed vault value",
|
name = "Show seed vault value",
|
||||||
description = "Adds the total value of all seeds inside the seed vault to the title",
|
description = "Adds the total value of all seeds inside the seed vault to the title",
|
||||||
position = 7
|
position = 8
|
||||||
)
|
)
|
||||||
default boolean seedVaultValue()
|
default boolean seedVaultValue()
|
||||||
{
|
{
|
||||||
@@ -116,7 +127,7 @@ public interface BankConfig extends Config
|
|||||||
keyName = "bankPinKeyboard",
|
keyName = "bankPinKeyboard",
|
||||||
name = "Keyboard Bankpin",
|
name = "Keyboard Bankpin",
|
||||||
description = "Allows using the keyboard keys for bank pin input",
|
description = "Allows using the keyboard keys for bank pin input",
|
||||||
position = 8
|
position = 9
|
||||||
)
|
)
|
||||||
default boolean bankPinKeyboard()
|
default boolean bankPinKeyboard()
|
||||||
{
|
{
|
||||||
@@ -127,7 +138,7 @@ public interface BankConfig extends Config
|
|||||||
keyName = "searchKeybind",
|
keyName = "searchKeybind",
|
||||||
name = "Search Shortcut",
|
name = "Search Shortcut",
|
||||||
description = "Keyboard shortcut for initiating a bank search",
|
description = "Keyboard shortcut for initiating a bank search",
|
||||||
position = 9
|
position = 10
|
||||||
)
|
)
|
||||||
default Keybind searchKeybind()
|
default Keybind searchKeybind()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ public class BankPlugin extends Plugin
|
|||||||
private static final String DEPOSIT_WORN = "Deposit worn items";
|
private static final String DEPOSIT_WORN = "Deposit worn items";
|
||||||
private static final String DEPOSIT_INVENTORY = "Deposit inventory";
|
private static final String DEPOSIT_INVENTORY = "Deposit inventory";
|
||||||
private static final String DEPOSIT_LOOT = "Deposit loot";
|
private static final String DEPOSIT_LOOT = "Deposit loot";
|
||||||
|
private static final String TOGGLE_PLACEHOLDERS = "Always set placeholders";
|
||||||
private static final String SEED_VAULT_TITLE = "Seed Vault";
|
private static final String SEED_VAULT_TITLE = "Seed Vault";
|
||||||
|
|
||||||
private static final String NUMBER_REGEX = "[0-9]+(\\.[0-9]+)?[kmb]?";
|
private static final String NUMBER_REGEX = "[0-9]+(\\.[0-9]+)?[kmb]?";
|
||||||
@@ -174,9 +175,12 @@ public class BankPlugin extends Plugin
|
|||||||
MenuEntry[] menuEntries = client.getMenuEntries();
|
MenuEntry[] menuEntries = client.getMenuEntries();
|
||||||
for (MenuEntry entry : menuEntries)
|
for (MenuEntry entry : menuEntries)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((entry.getOption().equals(DEPOSIT_WORN) && config.rightClickBankEquip())
|
if ((entry.getOption().equals(DEPOSIT_WORN) && config.rightClickBankEquip())
|
||||||
|| (entry.getOption().equals(DEPOSIT_INVENTORY) && config.rightClickBankInventory())
|
|| (entry.getOption().equals(DEPOSIT_INVENTORY) && config.rightClickBankInventory())
|
||||||
|| (entry.getOption().equals(DEPOSIT_LOOT) && config.rightClickBankLoot()))
|
|| (entry.getOption().equals(DEPOSIT_LOOT) && config.rightClickBankLoot())
|
||||||
|
|| (entry.getTarget().contains(TOGGLE_PLACEHOLDERS) && config.rightClickPlaceholders())
|
||||||
|
)
|
||||||
{
|
{
|
||||||
event.setForceRightClick(true);
|
event.setForceRightClick(true);
|
||||||
return;
|
return;
|
||||||
@@ -189,7 +193,8 @@ public class BankPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
if ((event.getOption().equals(DEPOSIT_WORN) && config.rightClickBankEquip())
|
if ((event.getOption().equals(DEPOSIT_WORN) && config.rightClickBankEquip())
|
||||||
|| (event.getOption().equals(DEPOSIT_INVENTORY) && config.rightClickBankInventory())
|
|| (event.getOption().equals(DEPOSIT_INVENTORY) && config.rightClickBankInventory())
|
||||||
|| (event.getOption().equals(DEPOSIT_LOOT) && config.rightClickBankLoot()))
|
|| (event.getOption().equals(DEPOSIT_LOOT) && config.rightClickBankLoot())
|
||||||
|
|| (event.getTarget().contains(TOGGLE_PLACEHOLDERS) && config.rightClickPlaceholders()))
|
||||||
{
|
{
|
||||||
forceRightClickFlag = true;
|
forceRightClickFlag = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user