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:
@@ -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(
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user