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

Method createNewWorld

src/main/java/mudmap2/frontend/Mainwindow.java:217–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

215 }
216
217 public void createNewWorld() {
218 final String name = JOptionPane.showInputDialog(this, "Enter new world name", "New world", JOptionPane.PLAIN_MESSAGE);
219 if (name != null && !name.isEmpty()) {
220 // create a new world
221 try {
222 final World world = WorldManager.getNewWorld(name);
223 createTab(world);
224 } catch (final Exception ex) {
225 Logger.getLogger(Mainwindow.class.getName()).log(Level.SEVERE, null, ex);
226 JOptionPane.showMessageDialog(this, StringHelper.join("Couldn't create world \"", name, "\":\n", ex.getMessage()));
227 }
228 }
229 }
230
231 /**
232 * create world tab

Callers 1

actionPerformedMethod · 0.95

Calls 5

getNewWorldMethod · 0.95
createTabMethod · 0.95
joinMethod · 0.95
isEmptyMethod · 0.65
getNameMethod · 0.45

Tested by

no test coverage detected