no longer strip entire menu, using swap function

This commit is contained in:
Justin
2019-05-19 18:49:49 +10:00
parent d8bb022e4e
commit 63e813b6b8

View File

@@ -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)
{