wow it works :o

This commit is contained in:
ThatGamerBlue
2021-05-08 16:43:24 +01:00
parent c1c17ebda6
commit 26eb0d4533
2 changed files with 8 additions and 2 deletions

View File

@@ -32,6 +32,12 @@ import net.runelite.api.MenuEntry;
*/
public class MenuEntryAdded extends MenuEntry
{
// Here for RuneLite compatibility (different parameter order)
public MenuEntryAdded(String option, String target, int type, int identifier, int actionParam0, int actionParam1)
{
super(option, target, identifier, type, actionParam0, actionParam1, false);
}
public MenuEntryAdded(String option, String target, int identifier, int opcode, int param0, int param1, boolean forceLeftClick)
{
super(option, target, identifier, opcode, param0, param1, forceLeftClick);

View File

@@ -111,7 +111,7 @@ public class NpcIndicatorsPluginTest
when(client.getCachedNPCs()).thenReturn(new NPC[]{npc}); // id 0
when(client.getMenuEntries()).thenReturn(new MenuEntry[]{new MenuEntry()});
MenuEntryAdded menuEntryAdded = new MenuEntryAdded("", "Goblin", MenuAction.NPC_FIRST_OPTION.getId(), 0, -1, -1, false);
MenuEntryAdded menuEntryAdded = new MenuEntryAdded("", "Goblin", MenuAction.NPC_FIRST_OPTION.getId(), 0, -1, -1);
npcIndicatorsPlugin.onMenuEntryAdded(menuEntryAdded);
MenuEntry target = new MenuEntry();
@@ -136,7 +136,7 @@ public class NpcIndicatorsPluginTest
when(client.getCachedNPCs()).thenReturn(new NPC[]{npc}); // id 0
when(client.getMenuEntries()).thenReturn(new MenuEntry[]{new MenuEntry()});
MenuEntryAdded menuEntryAdded = new MenuEntryAdded("", "Goblin", MenuAction.NPC_FIRST_OPTION.getId(), 0, -1, -1, false);
MenuEntryAdded menuEntryAdded = new MenuEntryAdded("", "Goblin", MenuAction.NPC_FIRST_OPTION.getId(), 0, -1, -1);
npcIndicatorsPlugin.onMenuEntryAdded(menuEntryAdded);
MenuEntry target = new MenuEntry();