From 73df32172e5f88db05d0aab847296c8e37106daa Mon Sep 17 00:00:00 2001 From: A248 Date: Thu, 31 Oct 2019 20:10:20 -0400 Subject: [PATCH] Add getState(NPCState) Adds NPC#getState(NPCState) to return a boolean indicating whether the NPC in question has a specific state. --- api/src/main/java/net/jitse/npclib/api/NPC.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/src/main/java/net/jitse/npclib/api/NPC.java b/api/src/main/java/net/jitse/npclib/api/NPC.java index 7fa369f..4caae2b 100644 --- a/api/src/main/java/net/jitse/npclib/api/NPC.java +++ b/api/src/main/java/net/jitse/npclib/api/NPC.java @@ -101,6 +101,14 @@ public interface NPC { * @return Object instance. */ NPC toggleState(NPCState state); + + /** + * Get state of NPC. + * + * @param state The state requested. + * @return boolean on/off status. + */ + boolean getState(NPCState state); /** * Change the item in the inventory of the NPC.