* Adds a cooldown API for flags.
https://github.com/BentoBoxWorld/BentoBox/issues/754
Added 60 second cooldown to PVP flags
* Added cooldowns to database.
This way, if a cooldown is a long one it will be remembered even if the
server restarts.
* Update src/main/java/world/bentobox/bentobox/database/objects/adapters/FlagSerializer3.java
* API addition - adds reset deaths on new island
BentoBox currently tracks deaths in the worlds but the current API only
allows them to be reset when a player joins a team. This setting enables
deaths to be reset when a player starts a new island or resets an
island.
WARN: This should be the only additional WorldSetting we need for deaths.
* Update src/main/java/world/bentobox/bentobox/api/configuration/WorldSettings.java
* Update src/main/java/world/bentobox/bentobox/managers/IslandWorldManager.java
* Update src/main/java/world/bentobox/bentobox/managers/island/NewIsland.java
* Update src/main/java/world/bentobox/bentobox/managers/IslandWorldManager.java
Database closing was occuring too early. In priort releases it was
hidden because the connection would be automatically made again. When
this was removed, it exposed this error.
Now the single database connection will not be closed until all
registered database objects have finished with their async queues.
Further, the database connecter was being made once for each database
type. This was a waste of resources and it also meant that static fields
were being used. Now, only one database connecter object is made and
there are no static fields.
https://github.com/BentoBoxWorld/BentoBox/issues/813
* Add asynchronous task
* First commit
* Add asynchronous tasks for Blueprint.
* Add BlueprintSchematicConverter class to convert schematic in blueprint and inversely
* BlueprintClipboardReader, BlueprintClipboardWriter and BlueprintClipboardFormat have been added !
* BlueprintClipboardReader, BlueprintClipboardWriter and BlueprintClipboardFormat have been added !
* javadoc in BlueprintClipboardFormat
* Rename src/main/java/world/bentobox/bentobox/blueprints/BlueprintClipboardFormat.java to src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardFormat.java
* Update and rename src/main/java/world/bentobox/bentobox/blueprints/converter/BlueprintClipboardReader.java to src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardReader.java
* Update and rename src/main/java/world/bentobox/bentobox/blueprints/converter/BlueprintClipboardWriter.java to src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintClipboardWriter.java
* Update and rename src/main/java/world/bentobox/bentobox/blueprints/converter/BlueprintSchematicConverter.java to src/main/java/world/bentobox/bentobox/blueprints/worldedit/BlueprintSchematicConverter.java
https://github.com/BentoBoxWorld/BentoBox/issues/805
Database connectors were creating a new connection every time they were
called. Also the top-level database object was being recreated every
time getDatabase was requested.
Fixes#793
Add missing database transitions from YAML to MongoDB and SQLite.
Add missing database transitions from JSON to MongoDB and SQLite.
Add database transitions from SQLite to JSON.
Add database transitions from MongoDB to JSON.
Add database transitions from MariaDB to JSON.
* Added SQLite database
#570
* Makes SQLite work. Added config.yml option.
Tested on SQLite 3.24.0 2018-06-04 14:10:15
95fbac39baaab1c3a84fdfc82ccb7f42398b2e92f18a2a57bce1d4a713cbaapl
* Fix mariaDB test for close.
* Added test to MySQLDatabaseConnector and Handler
Prevents blueprints from being saved unless they have a bedrock block in
them.
If a blueprint is loaded and does not have a bedrock block, one is added
and a warning given in the console.
Added test class for BlueprintClipboardManager
https://github.com/BentoBoxWorld/BentoBox/issues/777
* Automatically provides key-value pairs for PremadeEvents
https://github.com/BentoBoxWorld/Challenges/pull/138
* Replaces PremadeEvent with BentoBoxEvent to make it look nicer.
* Cleaned up javadoc in BentoBoxEvent
* Cleaned up javadoc in PremadeEvent
* Added javadoc to async constructor in BentoBoxEvent
Previous check only looked for BEDROCK specifically. Actually, if there
is any block there, it should be true. Admins may accidentally remove
the bedrock and so this is a much safer approach.
https://github.com/BentoBoxWorld/BentoBox/issues/771
* Fix ender dragon issue in 1.14+
Mojang changed spawn chunk loading again, so they are all time loaded again. That mean, previous hack, that puts a portal on chunk load will not work anymore, as chunks are loaded before the event even is registered.
I fixed it by moving from ChunkLoadEvent to PlayerChangeWorldEvent as it will kick always when player joins the end.
* improved javadoc
https://github.com/BentoBoxWorld/BentoBox/issues/737
There are a lot of duplicate code here but I'm afraid it may require a more in-depth redesign of the placeholders than what we're allowed to do in a patch version.
Javadocs of the default placeholders have also been slightly improved.
* Fix NPE in PanelListenerTests
This will fix null-pointer.
One test will fail, as it is kinda bad as it conflicts with #761
* Re-ignored one of the test as it still fails
* Fix Challenges GUI issue 132
Fixed https://github.com/BentoBoxWorld/Challenges/issues/132
This issue happens because AnvilGUIClick event was processed after BentoBox registers new Panel.
I add extra check in InventoryClickEvent that not only checks if user has opened panel, but also compares if event and panel has the same inventory, before processing it as BentoBox Panel.
* Removed the unneeded PlayerKickEvent
- Each /bentobox subcommand now has its own dedicated permission
- bentobox.admin is a permission node for most of them
- /bentobox about: bentobox.about
- /bentobox version: bentobox.version
- updated the plugin.yml with the new permissions
https://github.com/BentoBoxWorld/BentoBox/issues/731
Issue was that classes were not being fully removed from class loaders
and commands needed to be unregistered from Bukkit. For the latter,
reflection was required to obtain the knownCommand map and change it
because there is no Bukkit API to unregister commands.
Adds cooldown to island leave command.
Tries to mitigate cooldown bypassing by players who change island owner
or use subowner or members to issue invites instead of owner. Now the
cooldown is based on the island ID itself.
Original API's are kept for compatibility with addons that use
cooldowns.
Relates to https://github.com/BentoBoxWorld/BentoBox/issues/727
https://github.com/BentoBoxWorld/BentoBox/issues/718
Caused by edge case where island owner has no safe home spot and all
other safe spots checked were unsafe too. Now uses homeTeleport method
to do a full island search for a safe spot.
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
This comes from #676, but it will not fix issue in given case, as these checks do not take so much time and they often fails in 0.01 miliseconds.
Anyway, adding checks in this order will improve performance for this checks in skyblock end world with enabled flag apx 80% for non-0;0 chunk. (
* 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)
* Upgrade BentoBox pom
- Replace default profile with ci profile, like in Challenges addon.
This profile will set value for build.number variable.
- Improve master profile
This will remove -SNAPSHOT for the end of revision and sets build.number to empty string.
* Add build.number at BentoBox version
This will allow to know which snapshot build is used in current build.
* Update pom.xml
Co-Authored-By: Florian CUNY <poslovitch@bentobox.world>
Addons need to declare themseves when they register a flag so that the
flag listener can be reset. Note that this is not mandatory unless the
flag declares a listener
* Create Latvian language file.
This will contain most of the translations.
The only missing part is Flag translations.
* Update latvian translation
Translate protection flags
* Update latvian language
Add missing translations.
- JSON is now the default database type
- JSON database files are now pretty-printed
- It is now possible to migrate from a database type to another through the use of a command and specific transition database types
- It is recommended to move from YAML to JSON.
= Commits breakdown =
* Proposal to make JSON the default database and retire YAML.
* Make JSON file format easier to read.
* Fix tests.
* Adds a hybrid Yaml2Json database type.
This database always tries to use JSON if it is available. If a YAML
file is found, it will be loaded and replaced with a JSON file.
* Move to generic database transition code
* Better comments
* Adds transitional database options so admins can choose.
Adds Yaml2MySQL option and changes config.yml to add instructions.
* Enables full database migration between databases.
Adds /bbox migrate command.
Adds a number of transition databases. DB starts transition when the
server boots up and will migrate organically. The admin can force an
immediate update using the bbox migrate command.
This operation requires an API breaking change: Addons that use the
Config API must now implement ConfigObject in their config class instead
of DataObject. This is to differentiate YAML config classes from YAML
database classes. If a class is already implements WorldSettings
(GameModeAddons), then no change is required because WorldSettings
implements ConfigObject now. If an old addon is used that does not
implement ConfigObject, BentoBox will not load.
* Added null check to YAML deletion
* Removed the 2YAML transition dbs because YAML is deprecated.
YAML does not support some data structures so conversion could corrupt
data.
* Fixed some javadoc and added missing DatabaseType#JSON2MARIADB
* Renamed package database/transitiondb to database/transition