The processes could run async, especially when chunk loading took a
while, so using fields that could change would result in blocks being
missed, especially in the nether or end. Switching to final vars avoids
this.
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1840
* Adds force-shown lines to the template.
Fixes a bug when template type was not selected correctly.
Changes "name" to "title" for border and background icons.
* Create TemplatedPanel and TemplatedPanelBuilder.
TemplatedPanel uses PanelTemplateRecord to create a functional panel.
Builder contains button builder callbacks that are used to create buttons with custom data.
Home teleporting is async so it's possible to issue the command multiple
times. This puts a flag in so that if a playeer is mid-teleport, then
issuing the go command will just repeat the text that the player is
teleporting home.
https://github.com/BentoBoxWorld/BentoBox/issues/1637
* StringBuffer (Java 5) may be declared as StringBuilder
* Replace map with flatMap
* Use instanceof naming
* No need to specify paramter types.
* Remove verbose code
* Fix JavaDoc issues
* Make internal class a record.
* Remove unused import.
* Make internal class a record.
* Made internal class a record.
* Removed unused import
* Fix typos
* Fix typo in test.
* Make variables final if they can be.
* Do not use final so that test can pass.
For testing, we use a trick to set this variable, but it won't work if
it is final. Right now, I'd like to keep the test.
* Implement basic functionality to read data from template panels.
Create TemplateReader class that has static method which generates a PanelTemplateRecord. This record contains every necessary information from user created template file so everyone could use it to generate a functional panel.
These classes are just for reading templates and do not create actual panel.
* Add template clearing via bentobox reload command.
This commit contains 2 changes:
- An option for Flag to use icon that is defined in locales after "icon" string.
- An option for ItemParser to parse icon or return given value, if parsing was not successful.
The flag option is not ideal, but it is simpler and easier to maintain then adding new config section where icons can be changed, as the locales file already contains a lot of info about each flag.
* Improve ItemParser code.
Add ability to parse text if Material is just a single string.
Add ability to parse player heads.
Add comments to the code.
* Fixes failing test.
* Version 1.17.3
* Use Map.of and List.of instead of Immutable collections
* Replace explicit type argument.
* Replace lamba with method reference
* Replace condition with Objects.requireNonNullElseGet
* Use String.repeat
* Use new switch expressions
* Use instanceof patten variables which are more compact
* Fuse toUnmodifiableList into stream and return it.
* Remove unnecessary toString() calls.
* Remove unnecessary public
* Extracted common part from if
* Simplify conditional expressions
* Remove unused IOExceptions
* Cast to long
* Use Map.putAll
* Use primitives
* Clarify what is null or not
* Addedd @Serial annotation introduced with Java 14.
* Use Optional.isEmpty instead of !isPresent
* Use flatMap then ifPresent
* Just use Arrays.stream
* Swap map and filter for null with Objects::nonNull
* Use expression lambda