Commit Graph

1794 Commits

Author SHA1 Message Date
Florian CUNY
775b7f2377 Improved gameworlds output in /bentobox version
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.
2019-05-25 10:34:32 +02:00
Florian CUNY
0d89f42441 Renamed "commands.bentobox.version.game-worlds" to "commands.bentobox.version.game-world" in locales 2019-05-25 09:58:18 +02:00
tastybento
a0d2320a04 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-05-24 19:43:02 -07:00
tastybento
184a5712ae Fixes bugs with Blueprint locale.
Ensures newly saved Blueprints appear in blueprint manager.
2019-05-24 19:42:51 -07:00
Florian CUNY
e184ed833c Slightly improved Catalog code 2019-05-24 22:04:28 +02:00
tastybento
068b0e7667 Merge branch 'blueprint-locale' into develop 2019-05-24 12:40:52 -07:00
BONNe
f2877da896 Added Addon#registerFlag(...) method (#697)
* 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
2019-05-24 17:33:54 +02:00
tastybento
a00dedbdc4 Fixed tests.
Relates to https://github.com/BentoBoxWorld/BentoBox/pull/692
2019-05-23 20:09:35 -07:00
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
6024423dad Blueprint manager localization - WIP 2019-05-22 12:16:38 -07: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
tastybento
01022a2500 Added bentobox addon reload command. 2019-05-08 12:18:33 -07:00
tastybento
180b88544a Database transition (#662)
- 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
2019-05-08 21:15:22 +02:00
Florian CUNY
0f4baad703 Fixed addons and hooks icons being misplaced in Management Panel 2019-05-08 16:25:38 +02:00
Florian CUNY
96464138f5 Avoid using Exception#printStackTrace() in WebManager 2019-05-08 16:14:32 +02:00
Florian CUNY
d42d0118d7 Fixed GitHub data gathering still using lowest connection interval value
Fixes commit a3a50c1961
2019-05-08 14:59:59 +02:00
Florian CUNY
fb87d0940f Fixed PlaceholderAPI expansions being unregistered after /papi reload
#629
2019-05-08 14:33:20 +02:00
Florian CUNY
6fe7c8fc51 Fixed PlaceholderAPI hook no longer working because it was run at startup 2019-05-08 14:31:03 +02:00
Florian CUNY
3c688a0b12 Ignored failing tests 2019-05-08 11:39:04 +02:00
Florian CUNY
bb420b2649 Fixed BentoBox not compiling due to one of the previous commits 2019-05-08 00:29:02 +02:00
Florian CUNY
36b3ec8527 Fixed javadoc on ServerVersion.V1_14 2019-05-08 00:22:48 +02:00
Florian CUNY
7ba3cd4570 Disabling Signs-dying protection from DYE flag for non-1.14 servers
#669
2019-05-08 00:20:57 +02:00
Florian CUNY
cfdd0c728a Added a few methods in ServerCompatibility 2019-05-08 00:20:34 +02:00
Florian CUNY
bf08475a4f Made DYE flag more permissive with signs
It now only applies when the player has dyes in his hand.
#669
2019-05-07 23:43:40 +02:00
tastybento
fc160d8c5f Aligns permissions and fixes permission bugs
https://github.com/BentoBoxWorld/BSkyBlock/issues/120
2019-05-07 13:14:25 -07:00
tastybento
9ba62e1711 WIP - reloads addons 2019-05-07 07:47:38 -07:00
wellnesscookie
91034f956e Fixes incorrect sethome if an island was locked (#666)
- for visitor/ coops/ trusted players. I think this reorder of execution fixs this, correct me if I'm wrong.

Issue #665 : Teleport > Sethome > Add 
(Sets incorrect if the island was locked for visitor as the member was not yet added to the island so the teleportation failed, therefore it will take the location of user from where he was standing when he typed /is team accept) 

Fix: Add > Teleport > Set

Fixes #665
2019-05-07 06:23:12 +02:00
tastybento
d8799f183f Makes copying schems to the clipboard async.
https://github.com/BentoBoxWorld/BentoBox/issues/504
2019-05-05 16:39:11 -07:00
tastybento
466aa9ff47 Adds more detail on deserialization error case in console. 2019-05-05 08:00:34 -07:00
tastybento
2f1bc509fa Change cycle click test to test Travis 2019-05-04 22:36:16 -07:00
tastybento
809e18b971 Adds island near command. 2019-05-04 22:24:04 -07:00
Florian CUNY
4f84f37461 Send message to player to tell he cannot change the island settings as he's not owner
#638
2019-05-04 23:27:53 +02:00
Florian CUNY
a3a50c1961 Made the GitHub connection interval be at least 15 minutes 2019-05-04 23:05:11 +02:00
tastybento
2d94e4447a Enables game mode addons to run as the only world (#661)
* Enables game mode addons to run as the only world.

Requires game mode addons to do the following in their onLoad:

1. Register commands
2. Be able to provide the chunk generator object because it will be used
to generate the worlds
3. Be able to provide the WorldSettings because the world name (string)
is required

* Sets world in CompositeCommand after onEnable

* Added Javadoc to Addon#onEnable and Addon#onLoad to better explain where to do what.
2019-05-04 22:56:55 +02:00
Florian CUNY
5d299abae4 Added es-ES (spanish) localization (credit to @SrAcosta) 2019-05-04 22:55:23 +02:00
Florian CUNY
a594427c5a Fixed tests 2019-05-04 22:26:26 +02:00
BONNe
18755f6377 Add color translation for Panel and PanelItem names (#660) 2019-05-04 11:26:38 +02:00
Florian CUNY
60231d58ab Fixed some mixed up placeholders
#659
island_distance, island_protection_range and island_creation_date had their actual value mixed up.
2019-05-04 11:24:29 +02:00
tastybento
9e15907f93 Added DYE protection flag
https://github.com/BentoBoxWorld/BentoBox/issues/653
(cherry picked from commit e94000528791e1abb30d19305e36529d825287b9)
2019-05-04 11:16:31 +02:00
tastybento
2b2ee7e42c Saves command rank settings to bentobox config.yml
https://github.com/BentoBoxWorld/BentoBox/issues/657
2019-05-03 22:29:03 -07:00
tastybento
4e0e283ace Pull island distance from settings instead of island 2019-05-02 21:23:46 -07:00
tastybento
800c111fd8 Fixes color code character. 2019-05-01 08:35:26 -07:00
tastybento
765f6adfce Makes console output more useful - just copy and paste missing YAML 2019-05-01 08:16:47 -07:00
tastybento
650e370ffe Rewrote chunk deletion (#648)
As of 1.14, chunk regeneration is no longer supported. This PR implements a not-chunk-based deletion that supports both 1.13 and 1.14 and which also allows us to get rid of the "multiple of 16" rule for island distances. This PR however does not remove the "multiple of 16" rule and a commit should be made thereafter.
This PR is also a pre-requisite to #640.

* Makes GameModes responsible for regenerating chunks.

* Deletes chunks manually to solve 1.14 chunk regen removal

* Fixes round up to 16 for island distance bug.

* Clean up - removing imports and stack traces

* Revert "Fixes round up to 16 for island distance bug."

This reverts commit 54f1ce0940.

* Adds island edge protection for deletion. Needs full testing.

* Completed testing. Works correctly.
2019-05-01 16:25:35 +02:00
Florian CUNY
95c0c612da Improved /bbox locale 2019-05-01 10:48:47 +02:00
Florian CUNY
51505ce276 Fixed typo in fr-FR locale 2019-05-01 10:21:10 +02:00
Florian CUNY
aee54b2162
Started fr-FR locale
#639
2019-05-01 10:00:55 +02:00
tastybento
6f00db0cc1 Added an admin locale analysis command.
Shows what strings are missing from which locale files.
2019-04-30 22:10:50 -07:00
tastybento
17493966d2 Merge remote-tracking branch 'origin/master' into develop 2019-04-29 19:43:09 -07:00
wellnesscookie
2ded5be6d6 Fixes user being spawned instead of target (#646)
If target had no island to be expelled to, second if statement would expel User (executor) itself
2019-04-29 18:25:08 -07:00
Florian CUNY
661bffad44
Improved javadoc on IslandsManager#getIslandCache() 2019-04-29 14:43:24 +02:00
tastybento
c785ccb39d Adds method to copy a clipboard without having to be a user. 2019-04-28 17:57:23 -07:00