no longer strip entire menu, using swap function
This commit is contained in:
@@ -463,11 +463,11 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
if (shiftModifier)
|
if (shiftModifier)
|
||||||
{
|
{
|
||||||
stripExceptFor("climb-up");
|
swap(client, "climb-up", option, target, true);
|
||||||
}
|
}
|
||||||
if (controlModifier)
|
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
|
@Subscribe
|
||||||
public void onPostItemComposition(PostItemComposition event)
|
public void onPostItemComposition(PostItemComposition event)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user