MCPcopy Create free account
hub / github.com/boxbeam/RedLib / fromString

Method fromString

src/redempt/redlib/region/MultiRegion.java:742–752  ·  view source on GitHub ↗

Turns a String generated by MultiRegion#toString() back into a MultiRegion @param input The String representation of a MultiRegion @return The MultiRegion

(String input)

Source from the content-addressed store, hash-verified

740 * @return The MultiRegion
741 */
742 public static MultiRegion fromString(String input) {
743 int pos = input.indexOf(' ');
744 World world = Bukkit.getWorld(input.substring(0, pos));
745 input = input.substring(pos + 1);
746 String[] split = input.split(",");
747 List<Region> regions = new ArrayList<>(split.length);
748 for (String string : split) {
749 regions.add(CuboidRegion.fromString(new StringBuilder(world.getName()).append(" ").append(string).toString()));
750 }
751 return new MultiRegion(regions);
752 }
753
754}

Callers

nothing calls this directly

Calls 8

fromStringMethod · 0.95
indexOfMethod · 0.80
splitMethod · 0.80
appendMethod · 0.80
toStringMethod · 0.65
getWorldMethod · 0.45
addMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected