Skip to content

Fix review findings: NPE guards, formula [level] variable, ChatInput bugs, loop optimizations#81

Merged
tastybento merged 3 commits into
developfrom
copilot/sub-pr-53
Apr 12, 2026
Merged

Fix review findings: NPE guards, formula [level] variable, ChatInput bugs, loop optimizations#81
tastybento merged 3 commits into
developfrom
copilot/sub-pr-53

Fix ChatInput: use flag to prevent double consumer invocation on vali…

0eefa08
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Apr 11, 2026 in 36s

Quality Gate failed

Failed conditions
4.2% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 155 in src/main/java/world/bentobox/upgrades/ui/utils/ChatInput.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this call to a deprecated class, it has been marked for removal.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z2dyCqiNXJ_-pqM&open=AZ1-6z2dyCqiNXJ_-pqM&pullRequest=81

Check warning on line 131 in src/main/java/world/bentobox/upgrades/ui/utils/ChatInput.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this call to a deprecated class, it has been marked for removal.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z2dyCqiNXJ_-pqI&open=AZ1-6z2dyCqiNXJ_-pqI&pullRequest=81

Check warning on line 160 in src/main/java/world/bentobox/upgrades/ui/utils/ChatInput.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this call to a deprecated class, it has been marked for removal.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z2dyCqiNXJ_-pqO&open=AZ1-6z2dyCqiNXJ_-pqO&pullRequest=81

Check warning on line 137 in src/main/java/world/bentobox/upgrades/dataobjects/rewards/LimitsReward.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused "tier" private field.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6zxDyCqiNXJ_-ppl&open=AZ1-6zxDyCqiNXJ_-ppl&pullRequest=81

Check warning on line 148 in src/main/java/world/bentobox/upgrades/dataobjects/prices/MoneyPrice.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the parentheses around the "rule" parameter

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z13yCqiNXJ_-pp3&open=AZ1-6z13yCqiNXJ_-pp3&pullRequest=81

Check warning on line 107 in src/main/java/world/bentobox/upgrades/dataobjects/prices/MoneyPrice.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused "tier" private field.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z13yCqiNXJ_-pp4&open=AZ1-6z13yCqiNXJ_-pp4&pullRequest=81

Check warning on line 50 in src/main/java/world/bentobox/upgrades/dataobjects/rewards/CommandReward.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Change this condition so that it does not always evaluate to "false"

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6zzlyCqiNXJ_-ppm&open=AZ1-6zzlyCqiNXJ_-ppm&pullRequest=81

Check warning on line 88 in src/main/java/world/bentobox/upgrades/dataobjects/prices/PermissionPrice.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused "tier" private field.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z1myCqiNXJ_-pp2&open=AZ1-6z1myCqiNXJ_-pp2&pullRequest=81

Check warning on line 23 in src/main/java/world/bentobox/upgrades/dataobjects/rewards/LimitsReward.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused import 'java.util.function.Consumer'.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6zxDyCqiNXJ_-ppk&open=AZ1-6zxDyCqiNXJ_-ppk&pullRequest=81

Check warning on line 85 in src/main/java/world/bentobox/upgrades/ui/utils/ChatInput.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this call to a deprecated class, it has been marked for removal.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z2dyCqiNXJ_-pp_&open=AZ1-6z2dyCqiNXJ_-pp_&pullRequest=81

Check warning on line 121 in src/main/java/world/bentobox/upgrades/ui/utils/ChatInput.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this call to a deprecated class, it has been marked for removal.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z2dyCqiNXJ_-pqF&open=AZ1-6z2dyCqiNXJ_-pqF&pullRequest=81

Check warning on line 181 in src/main/java/world/bentobox/upgrades/ui/utils/ChatInput.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this call to a deprecated class, it has been marked for removal.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z2dyCqiNXJ_-pqU&open=AZ1-6z2dyCqiNXJ_-pqU&pullRequest=81

Check warning on line 85 in src/main/java/world/bentobox/upgrades/dataobjects/rewards/CropGrowthReward.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused "tier" private field.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z0IyCqiNXJ_-ppt&open=AZ1-6z0IyCqiNXJ_-ppt&pullRequest=81

Check warning on line 144 in src/main/java/world/bentobox/upgrades/ui/utils/ChatInput.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this call to a deprecated class, it has been marked for removal.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z2dyCqiNXJ_-pqL&open=AZ1-6z2dyCqiNXJ_-pqL&pullRequest=81

Check warning on line 179 in src/main/java/world/bentobox/upgrades/ui/utils/ChatInput.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this call to a deprecated class, it has been marked for removal.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z2dyCqiNXJ_-pqS&open=AZ1-6z2dyCqiNXJ_-pqS&pullRequest=81

Check warning on line 3 in src/main/java/world/bentobox/upgrades/dataobjects/rewards/RangeReward.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused import 'com.google.gson.annotations.Expose'.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6zz3yCqiNXJ_-ppq&open=AZ1-6zz3yCqiNXJ_-ppq&pullRequest=81

Check warning on line 109 in src/main/java/world/bentobox/upgrades/dataobjects/rewards/RangeReward.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused "tier" private field.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6zz3yCqiNXJ_-ppr&open=AZ1-6zz3yCqiNXJ_-ppr&pullRequest=81

Check warning on line 85 in src/main/java/world/bentobox/upgrades/dataobjects/rewards/SpawnerReward.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused "tier" private field.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z0myCqiNXJ_-ppv&open=AZ1-6z0myCqiNXJ_-ppv&pullRequest=81

Check warning on line 103 in src/main/java/world/bentobox/upgrades/dataobjects/prices/ItemPrice.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused "tier" private field.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z1TyCqiNXJ_-pp0&open=AZ1-6z1TyCqiNXJ_-pp0&pullRequest=81

Check warning on line 75 in src/main/java/world/bentobox/upgrades/ui/utils/ChatInput.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this call to a deprecated class, it has been marked for removal.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z2dyCqiNXJ_-pp9&open=AZ1-6z2dyCqiNXJ_-pp9&pullRequest=81

Check warning on line 152 in src/main/java/world/bentobox/upgrades/dataobjects/rewards/SpawnerReward.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the parentheses around the "rule" parameter

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z0myCqiNXJ_-ppu&open=AZ1-6z0myCqiNXJ_-ppu&pullRequest=81

Check warning on line 108 in src/main/java/world/bentobox/upgrades/ui/utils/ChatInput.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this call to a deprecated class, it has been marked for removal.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z2dyCqiNXJ_-pqD&open=AZ1-6z2dyCqiNXJ_-pqD&pullRequest=81

Check warning on line 60 in src/main/java/world/bentobox/upgrades/dataobjects/rewards/CommandReward.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Parameter 1 to this call is marked "@NotNull" but null could be passed.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6zzlyCqiNXJ_-ppn&open=AZ1-6zzlyCqiNXJ_-ppn&pullRequest=81

Check warning on line 78 in src/main/java/world/bentobox/upgrades/ui/utils/ChatInput.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this call to a deprecated class, it has been marked for removal.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z2dyCqiNXJ_-pp-&open=AZ1-6z2dyCqiNXJ_-pp-&pullRequest=81

Check warning on line 126 in src/main/java/world/bentobox/upgrades/ui/utils/ChatInput.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this call to a deprecated class, it has been marked for removal.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Upgrades&issues=AZ1-6z2dyCqiNXJ_-pqH&open=AZ1-6z2dyCqiNXJ_-pqH&pullRequest=81