register

open fun register(triggerType: Any, method: Any): Trigger

Helper method register a trigger.

Called by taking the original name of the method, i.e. registerChat, removing the word register, and comparing it case-insensitively with the methods below.

Can also be passed a class of type net.minecraftforge.fml.common.eventhandler.Event as the first parameter to register functions for arbitrary forge events.

Return

The trigger for additional modification

Parameters

triggerType

the type of trigger

method

The name of the method or the actual method to callback when the event is fired

Sources

Link copied to clipboard