MCPcopy Create free account
hub / github.com/Garten/sourcecraft / getPlaceFromCoordinates

Method getPlaceFromCoordinates

src/gui/panel/InputPanel.java:129–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127 }
128
129 public Place getPlaceFromCoordinates() {
130 String placeName = this.getSaveLocation();
131 Place place = new Place(placeName);
132 Object object = this.comboBox_World.getSelectedItem();
133 if (object == null) {
134 return null;
135 }
136 place.setWorld(object.toString());
137 try {
138 Position start = new Position(Integer.valueOf(this.textField_FromX.getText()), Integer.valueOf(this.textField_FromY.getText()),
139 Integer.valueOf(this.textField_FromZ.getText()));
140 place.setStart(start);
141 Position end = new Position(Integer.valueOf(this.textField_ToX.getText()), Integer.valueOf(this.textField_ToY.getText()),
142 Integer.valueOf(this.textField_ToZ.getText()));
143 place.setEnd(end);
144 } catch (NumberFormatException e) {
145 return null;
146 }
147 return place;
148 }
149
150 public boolean getRememberPlaceSelected() {
151 return this.rdbtn_RememberAs.isSelected();

Callers

nothing calls this directly

Calls 5

getSaveLocationMethod · 0.95
setWorldMethod · 0.95
setStartMethod · 0.95
setEndMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected