NPC indicators plugin: Generate less garbage objects, fix highlight (#1531)

This commit is contained in:
Lucwousin
2019-09-03 22:42:23 +02:00
committed by Ganom
parent 9d5adc9bb3
commit 86e5658fd8
3 changed files with 57 additions and 27 deletions

View File

@@ -24,15 +24,15 @@
*/
package net.runelite.api.events;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import net.runelite.api.MenuEntry;
/**
* An event when a new entry is added to a right-click menu.
*/
@Data
@AllArgsConstructor
@RequiredArgsConstructor
public class MenuEntryAdded implements Event
{
/**
@@ -40,6 +40,15 @@ public class MenuEntryAdded implements Event
*/
private final MenuEntry menuEntry;
/**
* If this is set to true client mixin will update
* the menu entry with the modified values.
*
* Checks if count is the same, but doesn't check if there's
* been multiple changes
*/
private boolean wasModified;
public String getOption()
{
return menuEntry.getOption();