player-indicators: don't decorate non-player custom menu options
Splits the RUNELITE menu action into two actions: RUNELITE - general menu items. RUNELITE_PLAYER - menu items which target a player and have its identifier set to a player index. Then the player indicators plugin is changed to only decorate RUNELITE_PLAYER menu items.
This commit is contained in:
@@ -253,9 +253,10 @@ public class MenuManager
|
||||
@Subscribe
|
||||
public void onMenuOptionClicked(MenuOptionClicked event)
|
||||
{
|
||||
if (event.getMenuAction() != MenuAction.RUNELITE)
|
||||
if (event.getMenuAction() != MenuAction.RUNELITE
|
||||
&& event.getMenuAction() != MenuAction.RUNELITE_PLAYER)
|
||||
{
|
||||
return; // not a player menu
|
||||
return; // not a managed widget option or custom player option
|
||||
}
|
||||
|
||||
int widgetId = event.getWidgetId();
|
||||
@@ -294,7 +295,7 @@ public class MenuManager
|
||||
{
|
||||
client.getPlayerOptions()[playerOptionIndex] = menuText;
|
||||
client.getPlayerOptionsPriorities()[playerOptionIndex] = true;
|
||||
client.getPlayerMenuTypes()[playerOptionIndex] = MenuAction.RUNELITE.getId();
|
||||
client.getPlayerMenuTypes()[playerOptionIndex] = MenuAction.RUNELITE_PLAYER.getId();
|
||||
|
||||
playerMenuIndexMap.put(playerOptionIndex, menuText);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class PlayerIndicatorsPlugin extends Plugin
|
||||
|| type == PLAYER_SIXTH_OPTION.getId()
|
||||
|| type == PLAYER_SEVENTH_OPTION.getId()
|
||||
|| type == PLAYER_EIGTH_OPTION.getId()
|
||||
|| type == RUNELITE.getId())
|
||||
|| type == RUNELITE_PLAYER.getId())
|
||||
{
|
||||
Player[] players = client.getCachedPlayers();
|
||||
Player player = null;
|
||||
|
||||
Reference in New Issue
Block a user