### 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][
(player)
| 249 | [bksndr]: http://jd.bukkit.org/dev/apidocs/index.html?org/bukkit/command/CommandSender.html |
| 250 | ***/ |
| 251 | function getPlayerPos(player) { |
| 252 | player = _player(player); |
| 253 | if (player) { |
| 254 | if (__plugin.bukkit) { |
| 255 | if (player instanceof bkBlockCommandSender) return player.block.location; |
| 256 | else return player.location; |
| 257 | } |
| 258 | if (__plugin.canary) { |
| 259 | if ( |
| 260 | player instanceof Packages.net.canarymod.api.world.blocks.CommandBlock |
| 261 | ) |
| 262 | return player.block.location; |
| 263 | else return player.location; |
| 264 | } |
| 265 | } |
| 266 | return null; |
| 267 | } |
| 268 | exports.getPlayerPos = getPlayerPos; |
| 269 | /************************************************************************ |
| 270 | ### utils.getMousePos() function |