bentobox/src/main/java/world/bentobox/bentobox
tastybento 056cff4b6f
Code clean up from Sonar Cloud analysis (#2068)
* Code clean up from Sonar Cloud analysis

* Fix tests

* Remove code smell

* Rename "island" which hides the field declared at line 25.

* Removed code smells.

* Rename variable record to rec

Renamed "record" variable to not match a restricted identifier.
Restricted Identifiers should not be used as identifiers. "record" is
using in Java 16.

* Added private constructor to prevent instantiation of static class

Changed variable name to rec instead of restricted "record".

* Remove Blueprint code smells.

* Use a record for database settings constructor

Code smell: Methods should not have too many parameters. I'm not sure
what methods are using this class though.

* Update MyWorlds version

The POM for MyWorlds is invalid and causes a warning, but this still
persists with this version.

* Extracted nested try block into a separate method.

Makes it clear when reading the code what might be caught

* Extracted nested try block into a separate method.

* Fixed JavaDoc /** instead of just /*

* Extracted nested try block into a separate method.

* Refactored to not assign loop counter from within the loop body.

* Better delete option. With results.

That said, this is legacy code to handle an issue that occurred a long
time ago and this whole set of code can probably be removed.

* Catch Exceptions not Throwable

* Log error with BentoBox logError

* Use computeIfAbsent

Using these instead leads to cleaner and more readable code.

* User can no longer be null

* Added the missing @Deprecated annotation and @since ref

* Added @since reference

* Merge if statements

* Use BentoBox error logging.

* Added JavaDoc @since

* Remove deprecated class and move used class

* Remove deprecated WoodType and use Type.

* Remove unused import

* Extracted nested try block into a separate method.

* Comment empty default statement

* Clean up logic; avoid switch

* Use Java instead of Guava

* private constructor to hide the implicit public one.

* Private constructor to hide the implicit public one.

Merged if statement.

* Add comment

* if merge

* Make variable constant

* Remove unused imports

* Remove deprecated and unused method

* Remove unused import

* Typo

* Remove instanceof and cast

* Remove superfluous null check

* Put constant at bottom of file because @BONNe likes it there.

* Simplify particle validation code
2022-12-31 16:41:17 -08:00
..
api Code clean up from Sonar Cloud analysis (#2068) 2022-12-31 16:41:17 -08:00
blueprints Code clean up from Sonar Cloud analysis (#2068) 2022-12-31 16:41:17 -08:00
commands Release 1.17.3 (#1827) 2021-09-10 18:39:16 -07:00
database Code clean up from Sonar Cloud analysis (#2068) 2022-12-31 16:41:17 -08:00
hooks Code clean up from Sonar Cloud analysis (#2068) 2022-12-31 16:41:17 -08:00
listeners Code clean up from Sonar Cloud analysis (#2068) 2022-12-31 16:41:17 -08:00
lists Code clean up from Sonar Cloud analysis (#2068) 2022-12-31 16:41:17 -08:00
managers Code clean up from Sonar Cloud analysis (#2068) 2022-12-31 16:41:17 -08:00
nms Code cleanup (#2065) 2022-12-29 10:01:25 -08:00
panels Code clean up from Sonar Cloud analysis (#2068) 2022-12-31 16:41:17 -08:00
util Code clean up from Sonar Cloud analysis (#2068) 2022-12-31 16:41:17 -08:00
versions Support for 1.19.3 (#2060) 2022-12-11 17:51:52 -08:00
web Release 1.17.3 (#1827) 2021-09-10 18:39:16 -07:00
BStats.java Version 1.17.1 (#1796) 2021-07-10 18:27:57 -07:00
BentoBox.java Code cleanup (#2065) 2022-12-29 10:01:25 -08:00
Settings.java Rework SQL database implementation. (#1993) 2022-10-04 12:31:51 +03:00