## Utilities Module The `utils` module is a storehouse for various useful utility functions which can be used by plugin and module authors. It contains miscellaneous utility functions and classes to help with programming. ### utils.player() function The utils.player() function will return a [Play
(playerName)
| 48 | |
| 49 | ***/ |
| 50 | function _player(playerName) { |
| 51 | if (typeof playerName == 'undefined') { |
| 52 | if (typeof self == 'undefined') { |
| 53 | return null; |
| 54 | } else { |
| 55 | return self; |
| 56 | } |
| 57 | } else { |
| 58 | if (typeof playerName == 'string') |
| 59 | if (__plugin.canary) { |
| 60 | return Canary.server.getPlayer(playerName); |
| 61 | } else { |
| 62 | return bkBukkit.getPlayer(playerName); |
| 63 | } |
| 64 | else return playerName; // assumes it's a player object |
| 65 | } |
| 66 | } |
| 67 | /************************************************************************* |
| 68 | ### utils.world( worldName ) function |
| 69 |
no outgoing calls
no test coverage detected