MCPcopy Index your code
hub / github.com/walterhiggins/ScriptCraft / _player

Function _player

src/main/js/modules/utils/utils.js:50–66  ·  view source on GitHub ↗

## 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)

Source from the content-addressed store, hash-verified

48
49***/
50function _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

Callers 2

utils.jsFile · 0.85
getPlayerPosFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected