Skip to main content
 Warning: Unmaintained Version
Version: 0.4.2

ActionEntry

The ActionEntry defines an action to take. When it is triggered, it will run it's execute method. After which it will trigger all the next entries in the chain.

Usage

@Entry("example_action", "An example action entry.", Colors.RED, Icons.PERSON_RUNNING)
class ExampleActionEntry(
override val id: String = "",
override val name: String = "",
override val criteria: List<Criteria>,
override val modifiers: List<Modifier>,
override val triggers: List<String> = emptyList(),
): ActionEntry {
override fun execute(player: Player) {
// Do something
super.execute(player) // This will apply all the modifiers.
}
}

Typewriter will automatically trigger the next entries in the chain after the execute method is called. If you want to call the next entries in the chain manually, you can should the CustomTriggeringActionEntry.