Commit Graph

1735 Commits

Author SHA1 Message Date
BONNe
61a5b692ec Remove unnecessary checks in IslandsManager and IslandWorldManager (#692)
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.
2019-05-23 03:55:21 +02:00
tastybento
3a34133d1a Handles null flags in island object when loading from database
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
2019-05-21 00:15:58 -07: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
a0d6dd1d46 A copy over of the mysql async code to run on mariadb. 2019-05-19 09:07:28 -07:00
tastybento
b08b2c9ab5 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-05-19 08:42:14 -07:00
Florian CUNY
e7bd1e649c Added description in plugin.yml 2019-05-19 16:10:55 +02:00
Florian CUNY
3d70d5a6ae Fixed a few things in plugin.yml 2019-05-19 16:07:41 +02:00
tastybento
362d9f8362 Fixed code smells. 2019-05-18 16:13:10 -07:00
tastybento
e911a5593d Removed stacktrace output 2019-05-18 16:06:00 -07:00
tastybento
338764e452 Fix code smell on placeholder replacement 2019-05-18 16:04:33 -07:00
tastybento
259cb19cf3 Fix null check for pos1 and pos2 2019-05-18 16:02:12 -07:00
tastybento
7ea0edea91 Shifted panel to IslandCreationPanel 2019-05-18 12:22:19 -07:00
Florian CUNY
7c07982669 Avoid using printStackTrace in BlueprintsManager 2019-05-18 15:01:36 +02:00
Florian CUNY
7dc4c88dd9 Made "bp" the actual alias for AdminBlueprintCommand 2019-05-18 14:48:54 +02:00
tastybento
1cd794fd09 Missing import. 2019-05-17 21:13:27 -07:00
tastybento
f5c138f946 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-05-17 21:12:18 -07:00
tastybento
a3f8d2998f Fix pasting of blueprints from clipboard. Always pasted at y=0 2019-05-17 21:03:20 -07:00
tastybento
cf0b2ccdd5 Close file opened for reading blueprint before delete.
https://github.com/BentoBoxWorld/BentoBox/issues/687
2019-05-17 21:02:49 -07:00
barpec12
50592de136 Allow to load blueprints with lowercase names (#686)
Restore the possibility to load blueprints with lowercase names
2019-05-18 00:37:43 +02:00
BONNe
f4af446e2f Moved less intensive checks in front when blocking end dragon spawn (#684)
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. (
2019-05-17 15:22:10 +02:00
tastybento
b2a6396cf8 Fixes conversion of legacy schem entities. 2019-05-15 21:37:23 -07:00
tastybento
6b6a757727 Temporarily enabling the blueprint selection panel.
Please replace when the alternative panel does something.
2019-05-15 19:24:31 -07:00
tastybento
a55459a70c Fixes NPE when pasting and the blueprint has no original set. 2019-05-15 14:40:19 -07:00
tastybento
3cb9a0e4df Adds protection when pasting against unsupported blocks.
Will fix signs and wall signs from 1.13 to 1.14.
2019-05-15 14:18:51 -07: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
Florian CUNY
d19caa82ca Minor changes to fr-FR locale 2019-05-15 19:50:37 +02:00
tastybento
877046fe8c Fixes PanelListenerManagerTest
The InventoryView interface uses final methods so it cannot be mocked.
This test implements the interface so that the code can be tested.
2019-05-15 08:57:11 -07:00
tastybento
9437b916e0 Ignored PanelListenerManager tests 2019-05-14 13:29:14 +02:00
tastybento
1207a05d3f Added basic 1.14 """"""support"""""".
Addons are NOT compatible with 1.14.
Both 1.14 and 1.14.1 are now considered "NOT_SUPPORTED"
2019-05-14 11:03:57 +02:00
BONNe
bcc5af1758 Append build number to plugin's version in plugin.yml (#677)
* 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>
2019-05-14 10:22:48 +02:00
Florian CUNY
e0b942063b Fixes TNT protection: split TNT flag into TNT_DAMAGE (SETTING) and TNT_PRIMING (PROTECTION)
#566 and #649
2019-05-12 15:26:51 +02:00
Florian CUNY
5e9460e624 Fixed reloaded addons not being removed from the addons list
They were therefore "duplicated"
2019-05-12 14:09:49 +02:00
Florian CUNY
fa49e8b3b2 Made "commands.bentobox.reload.addon" use [name] text variable 2019-05-12 13:50:00 +02:00
Florian CUNY
3172cd098a Added message "addon reloaded" when reloading an addon 2019-05-12 13:49:12 +02:00
Florian CUNY
7a39e04a85 Made the loading time much more accurate 2019-05-12 11:48:56 +02:00
Florian CUNY
c60e790749 Added an islands count for gamemodes in Management Panel 2019-05-12 11:38:30 +02:00
Florian CUNY
b89b3972cb Improved lv-LV banner (again) 2019-05-12 11:18:17 +02:00
Florian CUNY
42b41d7938 Improved lv-LV banner 2019-05-11 20:48:49 +02:00
Florian CUNY
eb05f1fca5 Added locale authors names in the Language Selection panel 2019-05-11 20:41:28 +02:00
Florian CUNY
ba7c118266 Minor code cleanup in BukkitObjectTypeAdapter 2019-05-11 20:17:02 +02:00
tastybento
d631d2cb86 Fixes user tests. 2019-05-11 08:28:10 -07:00
tastybento
3908ba276f Improved comments on Bukkit type adapater. 2019-05-11 08:11:15 -07:00
Florian CUNY
3f83a89215 Added placeholders replacement in BentoBox's own messages
It is now possible to use external placeholders into BentoBox's messages.
2019-05-11 16:11:57 +02:00
Florian CUNY
b4fe70da0c Fixed indent and javadoc from previous commit 2019-05-11 14:28:57 +02:00
tastybento
8ce47772c2 Addon reloading: adds parameter to register flag
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
2019-05-10 15:18:13 -07:00
tastybento
779c370b6a Added a generic GSON Type Adapter for ConfigurationSerializabale objects
Bukkit has built-in serialization that can be used. Kept legacy
serialization for backwards compatibility and compactness.
2019-05-08 18:21:40 -07:00
tastybento
91b650bdee Added BoundingBoxTypeAdapter for database storage
Renamed other adpaters to be TypeAdapters for consistency.
2019-05-08 15:33:40 -07:00
tastybento
4e8a1071f2 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-05-08 12:31:57 -07:00
tastybento
2e8150da84 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git
into develop

Conflicts:
	src/main/java/world/bentobox/bentobox/managers/AddonsManager.java
2019-05-08 12:23:28 -07:00
BONNe
4175048abe Create Latvian language file. (#655)
* 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.
2019-05-08 21:22:15 +02:00