### utils.locationToJSON() function utils.locationToJSON() returns a [Location][cmloc] object in JSON form... { world: 'world5', x: 56.9324, y: 103.9954, z: 43.1323, yaw: 0.0, pitch: 0.0 } This can be useful if you write a plugin that needs to store location
(location)
| 142 | |
| 143 | ***/ |
| 144 | function _locationToJSON(location) { |
| 145 | var yaw = __plugin.bukkit |
| 146 | ? location.yaw |
| 147 | : __plugin.canary ? location.rotation : 0; |
| 148 | return { |
| 149 | world: '' + location.world.name, |
| 150 | x: location.x, |
| 151 | y: location.y, |
| 152 | z: location.z, |
| 153 | yaw: yaw, |
| 154 | pitch: location.pitch |
| 155 | }; |
| 156 | } |
| 157 | /************************************************************************* |
| 158 | ### utils.locationToString() function |
| 159 |