-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98c07c1
commit 9081bdd
Showing
3 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# ModAPI.addEventListener(String eventName, Function callback) | ||
This method is used to add event listeners to the event name specified. | ||
|
||
## Arguments: | ||
|
||
### (String) eventName | ||
This argument is used to specify internally which listener array to add the callback to. | ||
It has the following valid values: | ||
|
||
- `event` | ||
Called when any event is called. Passes an object with properties: | ||
- `event`: String representing the type of event being fired. | ||
- `data`: Object representing the original arguments to be passed to the callback. | ||
|
||
- `update` | ||
Called every client tick. No arguments passed to callback. | ||
|
||
|
||
### (Function) Callback | ||
The function to call when this event fires. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters