forked from GeyserMC/Geyser
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:
parent
dfba278f4d
commit
c30cb78e74
10 changed files with 393 additions and 5 deletions
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue