updated API docs based on comments in #284

This commit is contained in:
walterhiggins 2016-01-02 11:36:19 +00:00
parent 459820e2c7
commit f2a7d82b18
1 changed files with 7 additions and 0 deletions

View File

@ -853,11 +853,18 @@ The refresh() function can be used to only reload the ScriptCraft plugin (it's l
1. Disable the ScriptCraft plugin. 1. Disable the ScriptCraft plugin.
2. Unload all event listeners associated with the ScriptCraft plugin. 2. Unload all event listeners associated with the ScriptCraft plugin.
3. Cancel all timed tasks (created by `setInterval` & `setTimeout`)
3. Enable the ScriptCraft plugin. 3. Enable the ScriptCraft plugin.
... refresh() can be used during development to reload only scriptcraft javascript files. ... refresh() can be used during development to reload only scriptcraft javascript files.
See [issue #69][issue69] for more information. See [issue #69][issue69] for more information.
By default, if `self` is defined at runtime, it checks, whether `self` is server operator, otherwise fails with message. This behavivor can be modified using `skipOpCheck` parameter (useful, if you are doing some custom premission checks before calling this function).
#### Parameters
* skipOpCheck (boolean - optional) : If true, the function won't check if `self` is server operator.
[issue69]: https://github.com/walterhiggins/ScriptCraft/issues/69 [issue69]: https://github.com/walterhiggins/ScriptCraft/issues/69
### addUnloadHandler() function ### addUnloadHandler() function