function getPlayerPos(player) {
  player = _player(player);
  if (player) {
    if (__plugin.bukkit) {
      if (player instanceof bkBlockCommandSender) return player.block.location;
      else return player.location;
    }
    if (__plugin.canary) {
      if (
        player instanceof Packages.net.canarymod.api.world.blocks.CommandBlock
      )
        return player.block.location;
      else return player.location;
    }
  }
  return null;
}
**********************************************************************
### utils.getPlayerPos() function

This function returns the player's [Location][cmloc] (x, y, z, pitch
and yaw) for a named player.  If the "player" is in fact a
[BlockCommand][bkbcs] then the attached Block's location is returned.

#### Parameters
player : A [org.bukkit.command.CommandSender][bkbcs] (Player or BlockCommandSender) or player name (String).

#### Returns

A [Location][cmloc] object.

[bkbcs]: http://jd.bukkit.org/dev/apidocs/org/bukkit/command/BlockCommandSender.html
[bksndr]: http://jd.bukkit.org/dev/apidocs/index.html?org/bukkit/command/CommandSender.html
*