Converts a Location to a String @param loc The Location to be stringified @param separator The separator to use between pieces of information @return The stringified Location
(Location loc, String separator)
| 178 | * @return The stringified Location |
| 179 | */ |
| 180 | public static String toString(Location loc, String separator) { |
| 181 | return new StringBuilder().append(loc.getWorld().getName()).append(separator) |
| 182 | .append(loc.getX()).append(separator) |
| 183 | .append(loc.getY()).append(separator) |
| 184 | .append(loc.getZ()).toString(); |
| 185 | } |
| 186 | |
| 187 | /** |
| 188 | * Converts a String back to a Location |