-
Notifications
You must be signed in to change notification settings - Fork 16
Basics
Noppes edited this page Nov 25, 2015
·
2 revisions
When creating your mod with the CustomNPCs API you will want to:
@Mod(modid = YourMod.MODID, version = YourMod.VERSION,
dependencies = "after:customnpcs")
or if its required:
@Mod(modid = YourMod.MODID, version = YourMod.VERSION,
dependencies = "required-after:customnpcs")
To make sure CustomNPCs is loaded first.
Simple event handler:
public class CustomNPCEventHandler {
@SubscribeEvent
public void onInteract(NpcEvent.InteractEvent event){
//your code
}
}
To register your event handler:
NpcAPI.Instance().events().register(new CustomNPCEventHandler());