Class WaypointTriggerRegistry
java.lang.Object
net.citizensnpcs.trait.waypoint.triggers.WaypointTriggerRegistry
- All Implemented Interfaces:
Persister<WaypointTrigger>
Registers valid
WaypointTrigger classes and their chat configuration prompts. WaypointTriggers are persisted
using PersistenceLoader.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddTrigger(String name, Class<? extends WaypointTrigger> triggerClass, Class<? extends WaypointTriggerPrompt> promptClass) Creates an object instance from the givenDataKey.static Stringstatic PromptgetTriggerPromptFrom(String input) voidsave(WaypointTrigger instance, DataKey root) Saves the object instance to the givenDataKey.
-
Constructor Details
-
WaypointTriggerRegistry
public WaypointTriggerRegistry()
-
-
Method Details
-
create
Description copied from interface:PersisterCreates an object instance from the givenDataKey. Should not return null unless no data is present.- Specified by:
createin interfacePersister<WaypointTrigger>- Parameters:
root- The root key to load from- Returns:
- The created instance, or null if no data was present
-
save
Description copied from interface:PersisterSaves the object instance to the givenDataKey.- Specified by:
savein interfacePersister<WaypointTrigger>- Parameters:
instance- The object instance to saveroot- The key to save into
-
addTrigger
public static void addTrigger(String name, Class<? extends WaypointTrigger> triggerClass, Class<? extends WaypointTriggerPrompt> promptClass) -
describeValidTriggerNames
-
getTriggerPromptFrom
-