Skip to content

Boxed II: world templates, areas and box cleanup - #145

Merged
tastybento merged 3 commits into
developfrom
feature/world-templates
Nov 25, 2026
Merged

tastybento merged 3 commits into
developfrom
feature/world-templates

Fix the bugs SonarCloud found

01dd0fd
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded Nov 25, 2026 in 43s

Annotations

Check warning on line 27 in src/main/java/world/bentobox/boxed/generators/template/RawBiomes.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the record pattern instead of this pattern match variable.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQqC7-HIo0tBQUwYYh&open=AaIQqC7-HIo0tBQUwYYh&pullRequest=145

Check warning on line 10 in src/main/java/world/bentobox/boxed/Boxed.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused import 'java.util.List'.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQopuw473K8CMF9fWH&open=AaIQopuw473K8CMF9fWH&pullRequest=145

Check failure on line 53 in src/main/java/world/bentobox/boxed/areas/AreaManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 19 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQopuJ473K8CMF9fWC&open=AaIQopuJ473K8CMF9fWC&pullRequest=145

Check warning on line 186 in src/main/java/world/bentobox/boxed/commands/AdminAreasCommand.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace "e" with an unnamed pattern.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQopuz473K8CMF9fWJ&open=AaIQopuz473K8CMF9fWJ&pullRequest=145

Check warning on line 191 in src/main/java/world/bentobox/boxed/generators/template/Template.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace "e" with an unnamed pattern.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQoptj473K8CMF9fV-&open=AaIQoptj473K8CMF9fV-&pullRequest=145

Check warning on line 141 in src/test/java/world/bentobox/boxed/areas/BoxHeightTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a static import for "verify".

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQopvE473K8CMF9fWL&open=AaIQopvE473K8CMF9fWL&pullRequest=145

Check warning on line 116 in src/main/java/world/bentobox/boxed/generators/template/TemplateFile.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Return an empty array instead of null.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQopry473K8CMF9fV0&open=AaIQopry473K8CMF9fV0&pullRequest=145

Check failure on line 241 in src/main/java/world/bentobox/boxed/listeners/BoxCleaner.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 22 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQopud473K8CMF9fWE&open=AaIQopud473K8CMF9fWE&pullRequest=145

Check warning on line 120 in src/main/java/world/bentobox/boxed/generators/template/TemplateFile.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Return an empty array instead of null.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQopry473K8CMF9fV1&open=AaIQopry473K8CMF9fV1&pullRequest=145

Check warning on line 537 in src/main/java/world/bentobox/boxed/Boxed.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "java.nio.file.Files#delete" here for better messages on error conditions.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQopuw473K8CMF9fWG&open=AaIQopuw473K8CMF9fWG&pullRequest=145

Check warning on line 215 in src/main/java/world/bentobox/boxed/generators/template/TemplateBuilder.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this "Map.get()" and condition with a call to "Map.computeIfAbsent()".

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQoptg473K8CMF9fV7&open=AaIQoptg473K8CMF9fV7&pullRequest=145

Check warning on line 260 in src/main/java/world/bentobox/boxed/generators/template/TemplateFile.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace "e" with an unnamed pattern.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQopry473K8CMF9fV2&open=AaIQopry473K8CMF9fV2&pullRequest=145

Check warning on line 252 in src/main/java/world/bentobox/boxed/generators/template/TemplateBuilder.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this "Map.get()" and condition with a call to "Map.computeIfAbsent()".

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQoptg473K8CMF9fV6&open=AaIQoptg473K8CMF9fV6&pullRequest=145

Check warning on line 50 in src/test/java/world/bentobox/boxed/areas/AreaLocationStrategyTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this mock creation to a local variable.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQopvF473K8CMF9fWM&open=AaIQopvF473K8CMF9fWM&pullRequest=145

Check failure on line 42 in src/main/java/world/bentobox/boxed/areas/AreaManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename field "rows" to prevent any misunderstanding/clash with field "ROWS".

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQopuJ473K8CMF9fWB&open=AaIQopuJ473K8CMF9fWB&pullRequest=145

Check failure on line 218 in src/main/java/world/bentobox/boxed/commands/AdminAreasCommand.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "areas." 3 times.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQopuz473K8CMF9fWI&open=AaIQopuz473K8CMF9fWI&pullRequest=145

Check warning on line 87 in src/main/java/world/bentobox/boxed/generators/template/TemplateChunk.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor the code in order to not assign to this loop counter from within the loop body.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQopti473K8CMF9fV9&open=AaIQopti473K8CMF9fV9&pullRequest=145

Check failure on line 200 in src/main/java/world/bentobox/boxed/generators/template/TemplateBuilder.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 18 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=BentoBoxWorld_Boxed&issues=AaIQoptg473K8CMF9fV8&open=AaIQoptg473K8CMF9fV8&pullRequest=145