Add statistics menu (#1424)

* Add statistics menu

* Changed back button text

* Add check to make sure the player requested the statistics display

* Better item translation support; misc changes

* Clean up session getting?

* Remove extra debug that is likely unnecessary

* Remove unused function

* Update languages submodule

* Clean up javadoc comment

* Fix typo

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
This commit is contained in:
rtm516 2020-10-24 23:33:49 +01:00 committed by GitHub
parent dfba278f4d
commit c30cb78e74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 393 additions and 5 deletions

View file

@ -92,7 +92,7 @@ public class CustomFormWindow extends FormWindow {
}
public void setResponse(String data) {
if (data == null || data.equalsIgnoreCase("null") || data.isEmpty()) {
if (data == null || data.trim().equalsIgnoreCase("null") || data.isEmpty()) {
closed = true;
return;
}
@ -108,7 +108,7 @@ public class CustomFormWindow extends FormWindow {
List<String> componentResponses = new ArrayList<>();
try {
componentResponses = new ObjectMapper().readValue(data, new TypeReference<List<String>>(){});
componentResponses = new ObjectMapper().readValue(data.trim(), new TypeReference<List<String>>(){});
} catch (IOException e) { }
for (String response : componentResponses) {

View file

@ -72,14 +72,14 @@ public class SimpleFormWindow extends FormWindow {
}
public void setResponse(String data) {
if (data == null || data.equalsIgnoreCase("null")) {
if (data == null || data.trim().equalsIgnoreCase("null")) {
closed = true;
return;
}
int buttonID;
try {
buttonID = Integer.parseInt(data);
buttonID = Integer.parseInt(data.trim());
} catch (Exception ex) {
return;
}