Shift Looting (#786)

* Shift Looting

Adds the option to let you loot with the shift to walk plugin.

* Update ShiftWalkerPlugin.java

* Update ShiftWalkerConfig.java

* codestyle fix

codestyle fix

* Update ShiftWalkerConfig.java

* Update ShiftWalkerConfig.java

* Update ShiftWalkerPlugin.java
This commit is contained in:
GROUNDBOI
2019-06-28 16:26:08 -04:00
committed by Kyleeld
parent 2af2715ac8
commit 63cd22956d
2 changed files with 31 additions and 3 deletions

View File

@@ -26,11 +26,30 @@ package net.runelite.client.plugins.shiftwalker;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
// import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.ConfigItem;
@ConfigGroup("shiftwalkhere")
public interface ShiftWalkerConfig extends Config
{
@ConfigItem(
keyName = "shiftWalk",
name = "Shift to Walk",
description = "For when you want Walk here as a priority"
)
default boolean shiftWalk()
{
return false;
}
@ConfigItem(
keyName = "shiftLoot",
name = "Shift to Loot",
description = "For when people stand on your loot"
)
default boolean shiftLoot()
{
return false;
}
/*
@ConfigItem(

View File

@@ -50,7 +50,7 @@ public class ShiftWalkerPlugin extends Plugin
{
private static final String WALK_HERE = "Walk here";
private static final String TAKE = "Take";
@Inject
private ShiftWalkerConfig config;
@@ -92,11 +92,20 @@ public class ShiftWalkerPlugin extends Plugin
void startPrioritizing()
{
menuManager.addPriorityEntry(WALK_HERE);
if (config.shiftLoot())
{
menuManager.addPriorityEntry(TAKE);
}
if (config.shiftWalk())
{
menuManager.addPriorityEntry(WALK_HERE);
}
}
void stopPrioritizing()
{
menuManager.removePriorityEntry(TAKE);
menuManager.removePriorityEntry(WALK_HERE);
}
}