api: add npc accessor to menuentry
This commit is contained in:
@@ -122,4 +122,11 @@ public interface MenuEntry
|
||||
*/
|
||||
@Nullable
|
||||
Widget getWidget();
|
||||
|
||||
/**
|
||||
* Get the {@link NPC} this menu entry is targeting, if any.
|
||||
* @return
|
||||
*/
|
||||
@Nullable
|
||||
NPC getNpc();
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
package net.runelite.api.events;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import net.runelite.api.MenuEntry;
|
||||
@@ -37,6 +38,7 @@ import net.runelite.api.MenuEntry;
|
||||
@ToString(onlyExplicitlyIncluded = true)
|
||||
public class MenuEntryAdded
|
||||
{
|
||||
@Getter
|
||||
private final MenuEntry menuEntry;
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,6 +52,7 @@ public class MenuOptionClicked
|
||||
/**
|
||||
* The clicked menu entry
|
||||
*/
|
||||
@Getter
|
||||
private final MenuEntry menuEntry;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user