Commit Graph

10 Commits

Author SHA1 Message Date
tastybento 1215a43766 Add feature to limit blueprint availability. 2024-03-31 17:29:18 -07:00
tastybento 18983e5570
Code cleanup (#2065)
* Cast operands to (double)

* Code clean up from static analysis

* Revert the GitHubAPI version change because it didn't work.
2022-12-29 10:01:25 -08:00
BONNe 35ce1a7d81
Rework blueprint and blueprint bundle names. (#2026)
* Fixes issue when blueprint clipboard was stuck after saving.

The issue was that Map#putIfAbsent still creates a new task, even if object is already in map. The usage requires to use Map#computeIfAbsent.

* Rework blueprint and blueprint bundle names.

There was an issue with using non-english characters in blueprint names. It was not possible, as all chars for names were converted to lower cased english letters. It included display names.

I reworked it a bit and now it should be possible to set non-english names for bundles and blueprints.

Fixes #1954
2022-09-29 18:44:07 +03:00
tastybento a5393b117a Makes Blueprint Bundle uniqueIds case insensitive
This actually makes them always lowercase in the code.
The previous approach of using a case insensitive TreeMap was not
possible because it could not handle null values, which could occur if
the bundle had no blueprint set for a specific world environment. This
approach was the easiest and most straightforward.

The assumption here is that the admin was changing the unique name of
the blueprint bundle in the JSON file.

https://github.com/BentoBoxWorld/BentoBox/issues/865
2019-07-27 20:01:02 -07:00
tastybento 3f3ac57f1e Cleans up code smells. 2019-07-11 13:55:17 -07:00
tastybento 40f0591f7a Enables blueprint bundle slot positioning in GUI
https://github.com/BentoBoxWorld/BentoBox/issues/708
2019-06-02 15:52:27 -07:00
tastybento 94e90257fa Adds renaming and icon setting to the Blueprint Management panel
https://github.com/BentoBoxWorld/BentoBox/issues/701
2019-05-26 22:03:09 -07:00
tastybento 9e36865a9f Fixed some code smells (#698)
* WIP code clean up and code smell removal

* Tried to fix a few more code smells
2019-05-26 22:14:24 +02:00
tastybento 4c16b0d779 Implement Blueprint Bundles GUI (#691)
* WIP Blueprint GUI

* Basic implementation. Still WIP.

Needs to enable description adding.

* Added description entry for blueprint bundle.

* Readded maven-javadoc-plugin
2019-05-20 08:18:24 +02:00
tastybento 700043fe40 Implemeted Blueprint bundles and blueprints (#672)
* A prototype for Blueprint bundles and blueprints

This stores blueprints inside bundles. Each bundle can have up to 3
blueprints defines by the World.Environment.

This is not a finished manager. It just handles all the saving and
loading side of things. I thought this would help you so you can then
concentrate on the UI.

* WIP: Copy blocks to Blueprint done.

* WIP Pasting done.

* WIP: Added BlueprintsManager to ultimately replace SchemsManager.

* Moved blueprint suffix and changed to .blu

* Fixed unit test.

* Now tested and working.

Integrated with new island and resetting island.

If there are no blueprint bundles or blueprints then a default bedrock
set will be made and put in the game mode addon's blueprints folder.

Still to do: enable schems to be loaded and pasted for legacy support.
Add blueprints and a bundle to GameModeAddons like BSkyBlock.

* Renamed most of the classes

* Cleaned up clipboard and paster.

* Further cleanup on blueprint clipboard and paster.

* Merged blueprint classes into one package.

* Put Blueprint data objects in their own package.

Isolated schems classes for later removal.

* Renamed admin command classes and changed locale files.

* More clean up to remove schems

* Schem to blueprints converter done.

Converts schems to blueprint bundles and sets up a default set. Tested
the happy-path. Need to do more testing on edge cases.

* Added basic UI for development. Fixed bug with schem conversion.

* Adds permissions into the blueprints.

Fixes tests, cleans up some naming

* Added IslandCreationPanel and created BlueprintManagementPanel

* Fixed JSONDatabaseHandler's constructor being public

* Made the Blueprints button in ManagementPanel open the Blueprint management panel

* Fixed tests and ignored one (NPE)
2019-05-15 20:16:41 +02:00