Package com.codinglitch.lexiconfig
Class LexiconfigApi
java.lang.Object
com.codinglitch.lexiconfig.LexiconfigApi
- Direct Known Subclasses:
Lexiconfig
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThese are all the available event types for use inside theregisterListenermethod. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic LexiconfigApiprotected static final Map<Consumer<LexiconEvent>,LexiconfigApi.EventType> protected static final List<LexiconData> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcallEvent(LexiconfigApi.EventType eventType, LexiconEvent event) static voidstatic voidabstract PathThis is used to retrieve the configuration folder path, dependent on the modloader.static voidstatic <E extends LexiconEvent>
voidregisterListener(LexiconfigApi.EventType eventType, Consumer<E> listener) This used to register a listener of a certain type, which is fired in various parts of the lifecycle.static voidshelveLexicon(LexiconData lexicon) This method is used to shelve a lexicon to be registered for reloading events, etc.static void
-
Field Details
-
SHELVED_LEXICONS
-
LISTENERS
-
LIBRARIES
-
INSTANCE
-
-
Constructor Details
-
LexiconfigApi
public LexiconfigApi()
-
-
Method Details
-
info
-
debug
-
warn
-
error
-
shelveLexicon
This method is used to shelve a lexicon to be registered for reloading events, etc. and should be called within theshelveLexiconsmethod of aLexiconLibrary.- Parameters:
lexicon- The lexicon to shelve- See Also:
-
registerListener
public static <E extends LexiconEvent> void registerListener(LexiconfigApi.EventType eventType, Consumer<E> listener) This used to register a listener of a certain type, which is fired in various parts of the lifecycle. -
callEvent
-
getConfigPath
This is used to retrieve the configuration folder path, dependent on the modloader.- Returns:
- The path of the config folder
-