Package dev.foxikle.customnpcs.api
Class NPCApi
java.lang.Object
dev.foxikle.customnpcs.api.NPCApi
A class providing an interface using non NMS objects to use NPCs
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static dev.foxikle.customnpcs.internal.CustomNPCs
A static instance of the plugin for API use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NPC
Gets the NPC object by ID.static void
Initiailizes the API
-
Field Details
-
plugin
protected static dev.foxikle.customnpcs.internal.CustomNPCs pluginA static instance of the plugin for API use. The `NPCApi#initialize()` method must be called before using it.
-
-
Constructor Details
-
NPCApi
public NPCApi()
-
-
Method Details
-
initialize
public static void initialize()Initiailizes the API -
getNPC
Gets the NPC object by ID.- Parameters:
uuid
- the id of the NPC- Returns:
- the NPC object associated with the NPC
- Throws:
NullPointerException
- if the specified UUID is nullIllegalArgumentException
- if an NPC doesn't exist by that UUID
-