Commit Graph

2006 Commits

Author SHA1 Message Date
Florian CUNY
35a8aab145 Release 1.5.2 2019-06-16 11:24:27 +02:00
BONNe
12db414ea1 Fixed ender dragon issue in 1.14+ (#769)
* 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
2019-06-16 10:43:26 +02:00
Florian CUNY
2927aca98c Added "visited islands"-related default placeholders for gamemodes
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.
2019-06-16 10:12:36 +02:00
Florian CUNY
cc46726d46 Deprecated GameModePlaceholder#ISLAND_SPAWNPOINT
The %island_spawnpoint% is identical to the %island_center% placeholder.
2019-06-16 09:20:11 +02:00
Florian CUNY
98cb301070 Improved GameModePlaceholderReplacer javadoc 2019-06-16 09:19:23 +02:00
tastybento
acb7c1fc76 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git
into develop
2019-06-15 22:10:25 -07:00
tastybento
f50e59eef1 Fixed right click not clearing blueprints in management panel
Fixed NPE if a bundle does not have an end or nether bp.
2019-06-15 22:09:17 -07:00
tastybento
3ae98741c6 Removed unused imports 2019-06-15 22:08:29 -07:00
tastybento
5793608e08 Removed unused imports 2019-06-15 22:07:27 -07:00
Florian CUNY
07be933a9d Fixed some code smells 2019-06-15 22:56:57 +02:00
tastybento
a0e35b240b Added BlueprintsManagerTest and improved BlueprintsManager 2019-06-15 09:47:05 -07:00
Florian CUNY
6e734fc343 Fixed Island's BoundingBoxes being a bit too large 2019-06-15 13:56:32 +02:00
Florian CUNY
02ca693ade Improved bentobox commands descriptions in en-US locale 2019-06-15 13:43:48 +02:00
tastybento
86f6043421 Adds error reporting on addon incompatibility. 2019-06-14 18:49:42 -07:00
BONNe
673436a5b7 Finally fixed NPEs in PanelListenerManager tests (#765)
Tests failing because 'getClickedInventory()' was not defined there
2019-06-14 14:57:32 +02:00
BONNe
492361663e Fixed NPE in PanelListenerManager tests (#764)
* 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
2019-06-14 14:03:08 +02:00
BONNe
d1e9188959 Added ability to explicitly define asynchronous PremadeEvent (#763)
* Add ability to define asynchronous event

* minor formatting

* Removed another line jump
2019-06-14 13:59:47 +02:00
Florian CUNY
3c1f033819 Added a period to "commands.bentobox.reload.warning" in en-US 2019-06-14 11:12:14 +02:00
Florian CUNY
7c6f6a991b Ignored failing tests 2019-06-14 10:34:53 +02:00
Florian CUNY
bd64f94e13 Merge remote-tracking branch 'origin/develop' into develop 2019-06-14 10:23:06 +02:00
Florian CUNY
d064ed71ec Fixed NPE when the WebManager fails to gather data from GitHub API
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/760
2019-06-14 10:22:26 +02:00
BONNe
ebe2f5aa4c Secured the handling of InventoryClickEvent for panels (#761)
* 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
2019-06-14 10:03:54 +02:00
Florian CUNY
2e84860aa0 Added Island#getBoundingBox() and Island#getProtectionBoundingBox()
https://github.com/BentoBoxWorld/BentoBox/issues/758
2019-06-13 10:00:12 +02:00
Florian CUNY
0cdd774d0b Added nullable annotations to Island#getOwner() and Island#getName() 2019-06-13 09:57:11 +02:00
Florian CUNY
8cb5234a0c Added Island#getMaxX(), #getMaxZ(), #getMaxProtectedX(), #getMaxProtectedZ() 2019-06-13 09:56:24 +02:00
Florian CUNY
51738df54c Improved Island#onIsland(Location) javadoc 2019-06-13 09:48:34 +02:00
Florian CUNY
ad3cb821f4 Fixed BentoBoxReloadCommandTest 2019-06-12 13:25:28 +02:00
Florian CUNY
3e6fe52f95 Fixed CompositeCommand not handling correctly null permission prefixes
Added nullability annotations
2019-06-12 13:25:10 +02:00
Florian CUNY
e7f90bbd21 Fixed issues with permissions for /bentobox commands
- 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
2019-06-12 10:40:16 +02:00
Florian CUNY
880185ad4b Added "rl" alias for the AdminReloadCommand 2019-06-10 17:36:20 +02:00
Florian CUNY
35f8a80167 Improved the code for the RANK placeholder 2019-06-10 15:16:16 +02:00
ramirilyasov999
44038ddbda Added ru-RU translation
It is however based on 1.4.0's locales, so it may need to be updated.
2019-06-10 13:24:15 +02:00
Florian CUNY
69a477a678 Version 1.5.1 2019-06-10 09:40:43 +02:00
Florian CUNY
efbdcfc587 Simplified the selectBundle(...) method in IslandResetCommand 2019-06-10 09:18:30 +02:00
tastybento
54756e97e0 Fixes PLAINS biome in nether and end after island reset.
https://github.com/BentoBoxWorld/BentoBox/issues/745
2019-06-09 18:36:32 -07:00
tastybento
d5be5f81c2 Fixes and adds tests for IslandCreateCommand
Tests were failing from 824a744cd1
2019-06-09 17:18:17 -07:00
tastybento
db5bb8ed8b Creating end/nether islands on first join to dimension
Substitutes for PR #713 because the code did not work.
https://github.com/BentoBoxWorld/BentoBox/pull/713

Pastes and teleports to preferred spawn location.
2019-06-09 16:20:08 -07:00
tastybento
ca8b453e4b Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-06-09 15:04:20 -07:00
Florian CUNY
824a744cd1 Fixed the Island Creation Panel showing although there is 1 bundle available
Implements #744
2019-06-09 23:05:47 +02:00
tastybento
8ede58814a Merge remote-tracking branch 'YellowZaki/patch-4' into develop 2019-06-09 13:15:28 -07:00
Florian CUNY
5fc39b3691 Removed the check for updates button in the Management Panel
It needs the update checker to be implemented first
2019-06-09 17:52:15 +02:00
Florian CUNY
8e262fa933 Release 1.5.0
Finally!
2019-06-09 09:37:46 +02:00
Florian CUNY
284de9e288 Added config option 'logs.github-download-data' 2019-06-09 09:18:30 +02:00
Florian CUNY
2340b1991c Readded the description in CatalogEntry 2019-06-09 09:07:18 +02:00
Florian CUNY
870bdcb9f8 Catalog: rather send the user to the releases tab instead of the latest release 2019-06-09 09:02:25 +02:00
Florian CUNY
ad5aa4a938 Added compatible/supported versions to the disclaimer 2019-06-09 08:50:11 +02:00
Florian CUNY
d91222d30b Added ServerCompatibility.ServerVersion#getVersions(Compatibility...) 2019-06-09 08:49:37 +02:00
Florian CUNY
44e7004db1 Added javadoc since tag to PanelListenerManager#closeAllPanels() 2019-06-09 08:48:50 +02:00
tastybento
e4026928cd Completely redid the MySQL tests and added MariaDB tests 2019-06-08 23:01:20 -07:00
tastybento
fc2de2501c Added assertions to tests per SonarCloud 2019-06-08 19:14:25 -07:00
Florian CUNY
272e99bc12 Close all panels on plugin disable (#743)
* Close all panels on plugin disable
https://github.com/BentoBoxWorld/BentoBox/issues/726

* Adds panel closing to bbox reload and fixes errors.
2019-06-08 19:13:19 -07:00
tastybento
eeb3e64a97 Uses newer API for signs. 2019-06-08 17:27:24 -07:00
tastybento
c463ad0ea0 Fixed and added to InventoryListenerTest 2019-06-08 17:02:06 -07:00
tastybento
7f2d7ab03b protects 1.14 blocks
https://github.com/BentoBoxWorld/BentoBox/issues/732
2019-06-08 15:44:25 -07:00
tastybento
88a3ebbf2a Removed sum deaths setting.
This setting was originally for the ASkyBlock level calculation and so
should go into the Level addon, not BentoBox.
2019-06-08 09:05:49 -07:00
Florian CUNY
c79df4c813 Added javadoc since tags in WorldSettings 2019-06-08 08:01:42 +02:00
tastybento
efdb9a25dc Implements kicked-keep-inventory config setting.
https://github.com/BentoBoxWorld/BentoBox/issues/738
2019-06-07 22:18:34 -07:00
tastybento
ccdfccdf09 Removes a reset from player if they leave an island
https://github.com/BentoBoxWorld/BentoBox/issues/738
2019-06-07 21:33:29 -07:00
tastybento
f0baeece3d Added sum deaths setting support.
Other items WIP
https://github.com/BentoBoxWorld/BentoBox/issues/738
2019-06-07 21:00:13 -07:00
tastybento
899315b437 Fixes tests. 2019-06-07 19:14:28 -07:00
tastybento
9b8c8f6bc8 fixes issue with bbox reload command
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.
2019-06-07 17:37:16 -07:00
tastybento
9da79f3bc2 Writes a home location for the player after a teleport
Should help with teleporting after death. Previously some situations the
home was set, but not all.

https://github.com/BentoBoxWorld/BentoBox/issues/728#issuecomment-499433751
2019-06-06 13:23:40 -07:00
tastybento
7b2e8a657e Rewrite of cooldowns to use island ID instead of player ID
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
2019-06-05 22:55:32 -07:00
tastybento
d57a9aa6d8 Remove debug logging. 2019-06-05 19:32:03 -07:00
Florian CUNY
258eb097d8 Fixes merge for #714 and improved javadoc
An import was missing. oops!
2019-06-05 16:23:22 +02:00
BONNe
0dee0edaaf Improved handling of click events for Panels (#730)
Fixes #725
2019-06-05 14:59:05 +02:00
YellowZaki
4e273dab18 Added Island#hasNetherIsland() & Island#hasEndIsland() (#714)
* Added methods to know if the island has nether/end islands

* Fixed possible NullPointer

* Update src/main/java/world/bentobox/bentobox/database/objects/Island.java

Co-Authored-By: Florian CUNY <poslovitch@bentobox.world>

* Update src/main/java/world/bentobox/bentobox/database/objects/Island.java

Co-Authored-By: Florian CUNY <poslovitch@bentobox.world>

* Implemented tastybento's required changes
2019-06-05 14:48:53 +02:00
tastybento
f6bc6c6415 Adds check for players online for offline growth listener.
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/729
2019-06-03 19:55:44 -07:00
Florian CUNY
41d0c23dcb
Made 1.13 and 1.13.1 INCOMPATIBLE, 1.14.2 SUPPORTED
2000th commit!
2019-06-03 10:40:32 +02:00
tastybento
3e3754d335 Removes home locations that are null 2019-06-02 21:17:30 -07:00
tastybento
390532adbc Fixes an error that can occur with sign pasting 2019-06-02 21:17:16 -07:00
tastybento
5a6b1862a0 Added Island Creation Panel Test.
Fixed bugs with slot management.
2019-06-02 16:49:20 -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
Florian CUNY
5c8d88868a
Added 'rl' as an alias for /bentobox reload 2019-06-02 18:38:20 +02:00
jummes
5ac7769cad Added it-IT.yml (#724)
* Added it-IT.yml

* Added banner
2019-06-02 18:37:14 +02:00
BONNe
2d8b9ad628 Disable physics update when blocking the end dragon (#723) 2019-06-02 13:31:48 +02:00
tastybento
9b0575246c Reworked island team coop command and test. 2019-06-01 13:22:28 -07:00
tastybento
0ab56028dc Fixed bug with Addon for saving non-existent files from jar
Improved addon tests.
2019-06-01 12:23:29 -07:00
tastybento
d38912cb2f Removed stacktrace 2019-06-01 11:17:51 -07:00
BONNe
dd1b1176ef Update Latvian language file (#721) 2019-06-01 10:01:28 +02:00
Florian CUNY
c9936d18bc Continued to work on fr-FR locale 2019-06-01 09:59:08 +02:00
Florian CUNY
86b9202b53 Fixes commit 4f84f37461
It was using the Player#sendMessage() instead of User#sendMessage()
2019-06-01 07:33:03 +02:00
Florian CUNY
eebb2a982d Added MVdWPlaceholderAPI support and improved placeholders integration
#651
2019-05-31 10:56:03 +02:00
tastybento
a87ef8bff6 Fixes new team members randomly cannot join island.
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.
2019-05-30 23:30:34 -07:00
tastybento
2946e3c298 Fixes superflat generation with Multiverse
https://github.com/BentoBoxWorld/BentoBox/issues/716
2019-05-30 23:04:23 -07:00
YellowZaki
bd1cbf3252
End/Nether blueprint paste on teleport to dimension 2019-05-30 17:22:39 +02:00
tastybento
c7f2eb5f2a Fixes drop into block after island reset issue.
https://github.com/BentoBoxWorld/BentoBox/issues/705
2019-05-29 17:13:22 -07:00
YellowZaki
c7046be1de
Create end/nether island if not exists (TODO) 2019-05-29 21:33:16 +02:00
Florian CUNY
110deea28e Added "diameter" placeholder alternatives for island_distance and island_protection_range
Suggested on SpigotMC
2019-05-29 21:17:03 +02:00
Florian CUNY
8eadfc9212 Added since javadoc tag for IslandNearCommand 2019-05-29 21:08:20 +02:00
tastybento
607d92868e Hides deprecated flags from the flags list.
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.
2019-05-28 09:30:21 -07:00
Florian CUNY
ffd151c881
Added 1.14.2 as NOT_SUPPORTED
1.14.2 is still a buggy update, and SpigotMC likely won't release an official build for it at all.
2019-05-28 13:44:59 +02:00
tastybento
87e82f4d23 Stores blocks in order so blueprints are built from bottom up. 2019-05-27 14:44:58 -07:00
tastybento
7843d2b23a Fixes blueprint saving with same name.
Blueprints saved with the same name were not overwriting the internal
blueprint list causing duplicates.
2019-05-27 09:16:22 -07:00
tastybento
cca381e51a Fixes bug where chests were not being copied in blueprints
https://github.com/BentoBoxWorld/BentoBox/issues/706
2019-05-27 08:52:32 -07:00
tastybento
76391fd055 Fixes clearing of clipboard when copying
https://github.com/BentoBoxWorld/BentoBox/issues/707
2019-05-27 08:43:58 -07:00
tastybento
fb8e3887de Removes redundant approach.
https://github.com/BentoBoxWorld/BentoBox/issues/702
2019-05-26 22:18:03 -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
5acae3ff30 Fix instruction localization. 2019-05-26 19:41:57 -07:00
tastybento
2a1ce5eafa Added Blueprint Bundle renaming 2019-05-26 19:40:13 -07:00
tastybento
f5338bfaac Fix tests 2019-05-26 17:35:19 -07:00
tastybento
7882a77b14 Small optimization around utility sameworld check
May improve https://github.com/BentoBoxWorld/BentoBox/issues/676
2019-05-26 17:19:31 -07:00
tastybento
8ac0f08285 Fix - saved blueprints were using a null name until reload. 2019-05-26 16:33:29 -07:00
tastybento
0fd25f02cd Fixes pasting of blueprints with crops, etc.
https://github.com/BentoBoxWorld/BentoBox/issues/702

Also fixes pasting of entities in the ground when they are on blocks
like crops that are slightly less than an integer block high.
2019-05-26 16:07:50 -07:00
tastybento
c725a397e1 Added switch command help description. 2019-05-26 14:23:04 -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
Florian CUNY
daeae01d7b Added addon state display in /bbox v output
Updated all the locales accordingly
2019-05-26 21:59:51 +02:00
Florian CUNY
08b490c631 Added nullability annotations to PlayersManager#getName(UUID) 2019-05-26 21:58:24 +02:00
Florian CUNY
443a7c30c1 Added class-level javadoc in AdminSwitchCommand 2019-05-26 21:57:19 +02:00
tastybento
e1c8bb9f1c Adds Admin switch command to bypass protections.
Re-adds the global mod bypassprotect permission.

Adds removePerm and addPerm to user class.
2019-05-25 20:00:24 -07:00
tastybento
fc082558d5 Adjusted ordering of schematic block copying. 2019-05-25 12:34:53 -07:00
tastybento
f7ee12527a Fixes bedrock placement in blueprint.
Picks highest bedrock block as center block.
2019-05-25 12:18:41 -07:00
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