MCPcopy Create free account
hub / github.com/Neop/mudmap2 / getNewWorld

Method getNewWorld

src/main/java/mudmap2/backend/WorldManager.java:99–110  ·  view source on GitHub ↗

Creates and registers a new world @param name world name @return world

(String name)

Source from the content-addressed store, hash-verified

97 * @return world
98 */
99 public static World getNewWorld(String name){
100 World world = new World(name);
101
102 // workaround: create and move to default layer
103 if(world.getLayers().isEmpty()){
104 Layer layer = world.getNewLayer();
105 world.setHome(new WorldCoordinate(layer.getId(), 0, 0));
106 }
107
108 register(world);
109 return world;
110 }
111
112}

Callers 2

testGetNewWorldMethod · 0.95
createNewWorldMethod · 0.95

Calls 6

getLayersMethod · 0.95
getNewLayerMethod · 0.95
setHomeMethod · 0.95
getIdMethod · 0.95
registerMethod · 0.95
isEmptyMethod · 0.65

Tested by 1

testGetNewWorldMethod · 0.76