no longer strip entire menu, using swap function
This commit is contained in:
@@ -463,11 +463,11 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
{
|
||||
if (shiftModifier)
|
||||
{
|
||||
stripExceptFor("climb-up");
|
||||
swap(client, "climb-up", option, target, true);
|
||||
}
|
||||
if (controlModifier)
|
||||
{
|
||||
stripExceptFor("climb-down");
|
||||
swap(client, "climb-down", option, target, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -622,24 +622,6 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
private void stripExceptFor(String option)
|
||||
{
|
||||
MenuEntry[] newEntries = new MenuEntry[1];
|
||||
|
||||
for (MenuEntry entry : client.getMenuEntries())
|
||||
{
|
||||
if (entry.getOption().equalsIgnoreCase(option))
|
||||
{
|
||||
newEntries[0] = entry;
|
||||
}
|
||||
}
|
||||
|
||||
if (newEntries[0] != null)
|
||||
{
|
||||
client.setMenuEntries(newEntries);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onPostItemComposition(PostItemComposition event)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user