Converts a String generated by CuboidRegion#toString() back to a Region @param input The String representation of a Region @return The Region
(String input)
| 355 | * @return The Region |
| 356 | */ |
| 357 | public static CuboidRegion fromString(String input) { |
| 358 | String[] split = input.split(" "); |
| 359 | World world = Bukkit.getWorld(split[0]); |
| 360 | double minX = Double.parseDouble(split[1]); |
| 361 | double minY = Double.parseDouble(split[2]); |
| 362 | double minZ = Double.parseDouble(split[3]); |
| 363 | double maxX = Double.parseDouble(split[4]); |
| 364 | double maxY = Double.parseDouble(split[5]); |
| 365 | double maxZ = Double.parseDouble(split[6]); |
| 366 | return new CuboidRegion(new Location(world, minX, minY, minZ), new Location(world, maxX, maxY, maxZ)); |
| 367 | } |
| 368 | |
| 369 | /** |
| 370 | * Represents a state of a Region, not necessarily at the current point in time |
no test coverage detected