Related to https://github.com/BentoBoxWorld/BentoBox/issues/680
Redoes commit
095237cd5db3b7169df1275759c885b42d9d8d45#diff-fee448dd4d94f3c5faaab7655c47682c
Unknown flags in the database are now handled correctly. Added a test to
confirm correct operation.
It now displays the three dimensions for each world using a three-colour scale. Green means the world is generated and is an "island" world; orange means the world is generated but is not an "island" world and red means the world is not generated or does not exist. Actually, the overworld is always green, so I didn't put checks for it.
I also improved the overall layout for the game worlds display in each localization file.
* Add registerFlag method in Addon class that allows to register a new Flag just from Addon class.
This was missing, as request handlers and listeners already has faster methods.
* Update src/main/java/world/bentobox/bentobox/api/addons/Addon.java
Co-Authored-By: Florian CUNY <poslovitch@bentobox.world>
* Update src/main/java/world/bentobox/bentobox/api/addons/Addon.java
Co-Authored-By: Florian CUNY <poslovitch@bentobox.world>
* Use #getPlugin() instead of the getInstance
Removed checks overlaps a lot. It is not necessary to check multiple time if island is nether and end island, as they will not change their status in runtime.
Flags can become unknown to BentoBox due to an addon no longer being
installed, or a flag being removed from the code. When this happens and
an island object is loaded, the map of flags could contain multiple null
keys, which is illegal and therefore the island would not load. (A map
can only have one null key). A change back in February was also
deregistering deprecated flags, so any old databases may have already
had one null flag in them.
This change will convert any unknown or null flags into a temporary flag
with a known ID that starts with NULL_FLAG_ followed by a UUID. This
enables the object to be loaded by GSON successfully. Immediately after
loading, any flags that start with NULL_FLAG are removed, thus cleaning
up the flag map.
Addresses
https://github.com/BentoBoxWorld/BentoBox/issues/680