(String[] str, TempData pDefault)
| 11 | public boolean error = false; |
| 12 | |
| 13 | public Search(String[] str, TempData pDefault) { |
| 14 | Players result = Players.findByName(str); |
| 15 | |
| 16 | if (result.found) { |
| 17 | this.player = result.data; |
| 18 | this.rest = result.rest; |
| 19 | |
| 20 | } else { |
| 21 | if (result.rest.length == 0) return; |
| 22 | else if (result.rest[0].contains(",")) { |
| 23 | String co[] = result.rest[0].split(","); |
| 24 | |
| 25 | if (co.length == 2 && Strings.canParseInt(co[0]) && Strings.canParseInt(co[1])) { |
| 26 | Seq<String> rest = Seq.with(result.rest); |
| 27 | rest.remove(0); |
| 28 | |
| 29 | this.player = pDefault; |
| 30 | this.XY = new int[] {Strings.parseInt(co[0]), Strings.parseInt(co[1])}; |
| 31 | this.rest = rest.toArray(String.class); |
| 32 | return; |
| 33 | |
| 34 | } else Players.err(pDefault.player, "Wrong coordinates!"); |
| 35 | } else Players.errNotOnline(pDefault.player); |
| 36 | |
| 37 | this.error = true; |
| 38 | } |
| 39 | } |
| 40 | } |
nothing calls this directly
no test coverage detected