Commit Graph

2131 Commits

Author SHA1 Message Date
tastybento
be673fa527 Switched to latest Mockito and PowerMockito libs. WIP 2019-08-03 18:05:15 -07:00
tastybento
113f065609 Fixes Anvil protection.
https://github.com/BentoBoxWorld/BentoBox/issues/876
2019-08-03 16:57:37 -07:00
tastybento
13ee55a173
Tab panels (#857)
TabbedPanel extends Panel so that when an icon is
clicked, the context can be gathered by the click listener via the
getActiveTab method. In this case, the CycleClick and IslandToggleClick
classes cast the tab to the SettingsTab so they can retrieve the island
that the panel is referring too. This is required in the case where an
admin is setting a user's island settings. Previously the context of a
panel was only every about the user who opened the panel.

* Adds a tabbed panel API

* Added permission for tab

* Adds default world protection settings GUI

This switches the settings panel to use the new TabbedPanel API.

https://github.com/BentoBoxWorld/BentoBox/issues/384

* Adds admin command to change a player's settings.

Requires addon to add the admin settings command.

https://github.com/BentoBoxWorld/BentoBox/issues/59

* Locale for AdminSettingsCommand
2019-08-03 16:45:41 -07:00
tastybento
d622c12425 Fixes island creation on reservation.
New island panel was not being shown to reserved island players when
using /island or /island go.

https://github.com/BentoBoxWorld/BentoBox/issues/875
2019-08-02 10:29:41 -07:00
tastybento
91077ef895 Fixes NPE with island ban of an offline player
https://github.com/BentoBoxWorld/BentoBox/issues/872
2019-08-02 09:22:12 -07:00
tastybento
6c0305f8f5 Fixes permission check - removes dot 2019-07-31 23:24:10 -07:00
tastybento
fefa806852 Fixes concurrency issue when loading blueprints and bundles
https://github.com/BentoBoxWorld/BentoBox/issues/868
2019-07-30 08:58:43 -07:00
Florian CUNY
b8e4e2010d Fixed weird registration for end worlds (it was more strict than nether) in IWM 2019-07-29 21:48:54 +02:00
tastybento
5de285249f Make getPermissionPrefix consistent
https://github.com/BentoBoxWorld/BentoBox/issues/870
2019-07-29 12:00:45 -07:00
tastybento
fb86a25a5e Register worlds with Multiverse - reverts previous change
UseOwnGenerator is used by SkyGrid. This change makes sure MV
registration occurs.

https://github.com/BentoBoxWorld/SkyGrid/issues/22
2019-07-28 21:43:59 -07:00
tastybento
0f5629b729 Adds new flag change events and fires them.
Updated click tests.

https://github.com/BentoBoxWorld/BentoBox/issues/753
2019-07-28 16:15:23 -07:00
tastybento
a8578b5658 Forces blueprint names to be lower case
https://github.com/BentoBoxWorld/BentoBox/issues/865
2019-07-28 14:05:39 -07:00
tastybento
c267f5ef84 Added populators to the clean super flat fixer
https://github.com/BentoBoxWorld/SkyGrid/issues/22
2019-07-28 13:54:20 -07:00
tastybento
d746eb2a05 CleanSuperFlat block setting changed to not use physics
https://github.com/BentoBoxWorld/SkyGrid/issues/22
2019-07-28 13:48:37 -07:00
tastybento
799decfcac More defensive code. 2019-07-28 13:36:17 -07:00
tastybento
998d5390d1 Added defensive code.
https://github.com/BentoBoxWorld/BentoBox/issues/868
2019-07-28 13:31:35 -07:00
tastybento
ff91255a6a Prevents setting rank of visitor or lower.
https://github.com/BentoBoxWorld/BentoBox/issues/849

Adds test class for admin setrank command.
2019-07-27 21:01:14 -07:00
tastybento
a5393b117a Makes Blueprint Bundle uniqueIds case insensitive
This actually makes them always lowercase in the code.
The previous approach of using a case insensitive TreeMap was not
possible because it could not handle null values, which could occur if
the bundle had no blueprint set for a specific world environment. This
approach was the easiest and most straightforward.

The assumption here is that the admin was changing the unique name of
the blueprint bundle in the JSON file.

https://github.com/BentoBoxWorld/BentoBox/issues/865
2019-07-27 20:01:02 -07:00
tastybento
65aee40533 Code smell cleanup 2019-07-27 17:19:04 -07:00
tastybento
10b8c51aee Make superflat check more accurate
Will allow fix superflat to run in SkyGrid.

https://github.com/BentoBoxWorld/SkyGrid/issues/22
2019-07-27 10:47:48 -07:00
tastybento
2403cd201f Fixes tests, removes debug. 2019-07-27 10:43:58 -07:00
tastybento
e009cf5152 Fixes default bundle loop error.
If an addon doesn't have any default bundles a default one is made, but
the previous code was making multiple attempts to do that instead of
doing it once.
2019-07-27 10:15:37 -07:00
wellnesscookie
8ec38ce07d Fix compile failure with PR #861 (#866)
Missing ")" in the line 607. 
This happens when you edit it directly in github browser 🤣
2019-07-27 14:53:02 +02:00
wellnesscookie
962833ad60 Added Island#get- and #hasPlayersOnIsland methods (#861)
* Implements #get and #has - PlayersOnIsland method

Implements methods for #860

* Optimises #hasVisitors and #hasPlayersOnIsland

These methods will now check if there is at least one user that meets the conditions
2019-07-27 10:08:46 +02:00
tastybento
8c8d35b966 Fires BentoboxReadyEvent after BentoBox is reloaded. 2019-07-21 18:46:15 -07:00
tastybento
6926ecbb9e Implements an island reservation system using the admin register command (#850)
* Implements an island reservation system using the admin register command

Admin flies to an empty spot and registers the player there. This
creates a bedrock block to mark the spot but it sets the island as
reserved for the target player. The next time a player issues the island
command (or island create) they get the selection of islands and it is
pasted at that location.

https://github.com/BentoBoxWorld/BentoBox/issues/749

* 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>

* 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>
2019-07-22 00:36:14 +02:00
Florian CUNY
9291f02c04 Added MC 1.14.4 as SUPPORTED
According to bStats, 26 servers are currently using BentoBox on this Minecraft version, seemingly without issues.
2019-07-20 21:08:36 +02:00
Florian CUNY
affbb02ede Added database type to /bentobox version
Requested by @BONNe
2019-07-20 20:48:41 +02:00
tastybento
74372b391a Prevents items from disappearing when blocked from breaking blocks
https://github.com/BentoBoxWorld/BentoBox/issues/846
2019-07-18 22:43:35 -07:00
tastybento
e99f84f7c7 Prevents named mobs from being cleared on teleport.
Adds a setting in BentoBox config to set the clear radius.
Adds defensive code to avoid clearing mobs in non game worlds.

https://github.com/BentoBoxWorld/BentoBox/issues/847
https://github.com/BentoBoxWorld/BentoBox/issues/819
2019-07-18 21:58:16 -07:00
tastybento
0f16d58ee7 Uses a single config object instead of a new one every save.
Required to avoid concurrent async saves clashing.
2019-07-18 21:55:23 -07:00
tastybento
38248bad29 Provided better documentation around when flags should be declared.
Protects against null worlds.

Related to https://github.com/BentoBoxWorld/AcidIsland/issues/53
2019-07-18 18:45:59 -07:00
tastybento
6bbe9a3f2a Removes Lingering Splash Potion protection from 1.14 for now.
Will be put back in when we move to 1.14 officially.

https://github.com/BentoBoxWorld/BentoBox/issues/810
2019-07-13 22:37:27 -07:00
tastybento
e284a6b57a Adds ability to require players to stand still for a command to execute
https://github.com/BentoBoxWorld/BentoBox/issues/837
2019-07-13 22:32:09 -07:00
tastybento
5fe4cccf7b Corrects wrong branch commit for world protection flags.
https://github.com/BentoBoxWorld/BentoBox/issues/840
The previous commit was a different approach. This is the correct one.
Does not break API.
2019-07-13 19:31:20 -07:00
tastybento
574fbc182f Added world protection settings to config
https://github.com/BentoBoxWorld/BentoBox/issues/840

This adds (or fixes) the ability for admins to set the default setting
of a protection flag. The flags go in the world flags section of a game
mode's config.yml.
2019-07-13 15:25:10 -07:00
tastybento
9422f8ac3d Added purge protection command and test class for purge.
Note that game mode addons must add the purge command before it can be
used.

https://github.com/BentoBoxWorld/BentoBox/issues/836
2019-07-11 22:50:32 -07:00
tastybento
a30fc4b102 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-07-11 13:55:26 -07:00
tastybento
3f3ac57f1e Cleans up code smells. 2019-07-11 13:55:17 -07:00
BONNe
6e76f1aa55 Update lv-LV.yml (#832)
Add purge command translations.
2019-07-11 18:12:24 +02:00
wellnesscookie
bdff4a7a50 Corrects message string for demote command (#835)
Mistake from #834
2019-07-11 18:10:49 +02:00
wellnesscookie
dd0396161e Fixes owner being allowed to demote himself (#834)
* Fixes owner demoting himself to subowner

This occurred whilst owner demoted himself to a subowner that led to non existence of the true owner

* Adds error on demote-yourself message
2019-07-11 07:52:57 -07:00
tastybento
1c1996ba4c SQL Database abstraction (#831)
* Database abstraction WIP

* Removes code duplication in the databases

Fixes a regression bug on database connections - more than 1 were being
made again.

* Added ignores to tests because they run async now
2019-07-11 09:31:28 +02:00
tastybento
b5367200df Adds admin purge command (#829)
Implements #5
2019-07-11 09:23:53 +02:00
tastybento
dc56156904
Updated JSONDatabaseHandler to remove debug
https://github.com/BentoBoxWorld/BentoBox/issues/830
2019-07-10 11:52:56 -07:00
BONNe
95036cb60b Update lv-LV translation. (#828)
Add missing translation strings.
2019-07-10 08:39:45 -07:00
tastybento
a88b241633 Removed code smell. 2019-07-10 08:28:23 -07:00
tastybento
458a4a19f5 Makes JSON database async for saving and deletion (#827) 2019-07-10 09:22:43 +02:00
tastybento
060c602009
Makes command ranks a protection setting (#823) 2019-07-08 20:02:58 -07:00
Florian CUNY
85b9740892
Added tr-TR locale (credit to Over_Brave) 2019-07-07 15:05:54 +02:00
tastybento
44003773c7 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-07-06 23:33:22 -07:00
tastybento
abd88c0826 Adds a cooldown API for flags. (#821)
* 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
2019-07-07 08:08:16 +02:00
Florian CUNY
f44b36267d
Improved the GitHub "download data" messages
added a message to tell the download is done
made the "could not connect" message only show if isLogGitHubDownloadData() is set to true
2019-07-07 08:06:16 +02:00
tastybento
b6fcf511a6 API addition - adds reset deaths on new island (#817)
* 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
2019-07-07 07:59:49 +02:00
tastybento
8b79ce3b3e Removes nether trees (#822)
https://github.com/BentoBoxWorld/BentoBox/issues/746

NOTE: The settings will need to be removed from the game mode addons too otherwise it will be confusing to admins.
2019-07-07 07:52:48 +02:00
tastybento
3f29c29243 Import cleanup 2019-07-06 22:05:47 -07:00
tastybento
6634a4e1f5 Fixes issue with hostile mobs not being removed on teleport
https://github.com/BentoBoxWorld/BentoBox/issues/818
2019-07-06 13:42:25 -07:00
tastybento
e9ca8733c0 Avoids trying to paste islands on portal if use own generator is true.
This affected SkyGrid.

https://github.com/BentoBoxWorld/SkyGrid/issues/18
2019-07-05 22:00:09 -07:00
tastybento
6d7f0eaf6d Avoids NPE in Admin Delete 2019-07-05 21:46:35 -07:00
tastybento
d6b0859d40 Teleports void visitors to same environment as they left.
https://github.com/BentoBoxWorld/BentoBox/issues/814
2019-07-05 21:46:09 -07:00
tastybento
edd7bbf97a A lot of database work.
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
2019-07-05 20:11:06 -07:00
tastybento
014c5d574f Fixes clean super flat tests. 2019-07-05 20:07:19 -07:00
tastybento
5c3817d9fe Added ELYTRA protection flag.
https://github.com/BentoBoxWorld/BentoBox/issues/386
2019-07-05 16:15:13 -07:00
tastybento
cb8b3234c8 Changes clean super flat to use manual chunk gen
https://github.com/BentoBoxWorld/BentoBox/issues/720
2019-07-05 15:24:01 -07:00
Florian CUNY
3a854d1fbd Fixed lock/ban causing the player to be put in SPECTATOR gamemode
https://github.com/BentoBoxWorld/BentoBox/issues/578
2019-07-05 20:27:09 +02:00
tastybento
b1f66eb31b Fixes bugs and code smells from Sonarcloud. 2019-07-04 16:54:05 -07:00
tastybento
cd4bea8a3e Fixes error with WorldEdit hook. 2019-07-04 13:56:52 -07:00
tastybento
349f339be3 Fixed tests for BlueprintsManager.
https://github.com/BentoBoxWorld/BentoBox/pull/811
2019-07-04 13:08:50 -07:00
Florian CUNY
f5a3fdee82 Another try at fixing NoClassDefFoundError with WorldEdit hook... 2019-07-04 17:11:17 +02:00
Florian CUNY
67a9dfa1cc Fixed NoClassDefFoundError when loading BentoBox without WorldEdit installed 2019-07-04 16:48:38 +02:00
Florian CUNY
d9d4805ea8 Added ability to edit the BlueprintBundle in IslandCreate/ResetEvent
https://github.com/BentoBoxWorld/BentoBox/issues/635
2019-07-04 14:31:21 +02:00
Florian CUNY
00ac8dd12a Added PostgreSQL database type
https://github.com/BentoBoxWorld/BentoBox/issues/789
2019-07-04 13:49:20 +02:00
Florian CUNY
45c78fc7f2 Minor code smells/javadoc fixes in database code 2019-07-04 13:47:48 +02:00
Florian CUNY
9fdf320fdf Ignored failing/errors in BlueprintsManagerTest 2019-07-04 13:26:46 +02:00
CustomEntity
6e8d5ef903 More async stuff & WorldEdit integration: Blueprint ClipboardFor… (#811)
* 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
2019-07-04 09:22:59 +02:00
Florian CUNY
6759a8acc9 We're no longer switching the player to SPECTATOR mode when teleporting
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/786
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/578
2019-07-03 10:36:50 +02:00
Florian CUNY
18f37c4efa Improved the on-the-fly Blueprint conversion
https://github.com/BentoBoxWorld/BentoBox/issues/802

It now avoids sending warnings if the conversion could be achieved seamlessly.
2019-07-02 09:31:51 +02:00
Florian CUNY
1fd880a529 Fixed code smell in AdminResetsResetCommand 2019-07-02 09:13:13 +02:00
tastybento
bd69179354 Ensures a single database connection is used. (#807)
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.
2019-07-02 06:46:54 +02:00
Florian CUNY
810e4806f3 Added WorldEditHook 2019-06-30 14:12:51 +02:00
Florian CUNY
4cccc8b2cf Fixed typo in one of DeleteIslandChunks' methods' name 2019-06-30 13:37:35 +02:00
Florian CUNY
563465ad14 Increased the minimum time between connections to the GH API to 60 minutes 2019-06-30 08:56:38 +02:00
Florian CUNY
64d89f9ca9 Improved success messages for admin commands and fixed failing tests
#630
2019-06-30 08:51:33 +02:00
Florian CUNY
6ceebe09ce Fixed tests 2019-06-30 08:24:55 +02:00
Florian CUNY
c09ff50604 Added better success message to island expel command
#630
2019-06-29 18:07:47 +02:00
Florian CUNY
9fe43fe75c Added better success message to island team commands
#630
2019-06-29 17:34:55 +02:00
Florian CUNY
a0785a79ec Fixed slight code smell in CatalogPanel 2019-06-29 16:55:00 +02:00
Florian CUNY
e23ed0b25d Added translatable tags and topics for the Catalog entries 2019-06-29 13:35:27 +02:00
Florian CUNY
3ce8b3060a Added BentoBoxLocale#set(String, String) 2019-06-29 13:35:27 +02:00
tastybento
4efdada98e Checks 4 corners of island to avoid overlapping issues
Relates to https://github.com/BentoBoxWorld/BSkyBlock/issues/149
2019-06-28 18:28:57 -07:00
tastybento
feef61cad5 Removed debug... 2019-06-28 17:18:03 -07:00
tastybento
a6dd175d61 Handles island deletion gracefully if use-own-generator is set to true.
Also handles situations where islands are pending deletion in the
database but the world they refer to has gone.

https://github.com/BentoBoxWorld/BentoBox/issues/797
2019-06-28 16:49:01 -07:00
tastybento
006305f7cf Added toString to IslandDeletion class for debugging use. 2019-06-28 16:46:39 -07:00
tastybento
a147f3fda7 Fixed bug with SQLite deletion not working. 2019-06-28 16:45:39 -07:00
Florian CUNY
64f03bad04 Updated the WebManager to gather the data from the new repo 2019-06-28 21:25:09 +02:00
BONNe
94a884b425 Added more transition databases (#794)
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.
2019-06-28 15:42:01 +02:00
Florian CUNY
e7133b2176
Added SQLite database (#791)
* 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
2019-06-28 08:33:43 +02:00
BONNe
a8655aa669 Fix error on bentobox version check (#792)
Comes from #149
We cannot ask GameSettings for The End or Nether worlds, as if they are disabled, then they do not have settings.
2019-06-27 22:58:36 +02:00
Florian CUNY
23f4e66a02 Switched to TheBusyBiscuit's GitHubWebAPI4Java 2019-06-27 21:20:12 +02:00
Florian CUNY
eb37beb79c Ignored failing tests 2019-06-27 14:39:34 +02:00
Florian CUNY
544bda4e01 Use DatabaseConnector#closeConnection() instead of duplicating code in database handlers 2019-06-27 14:19:26 +02:00
Florian CUNY
195eac09cf Fixed some code smells in JSONDatabaseHandler 2019-06-27 09:24:41 +02:00
tastybento
1f4fa0e203 Fixes bug where NPC inventories were protected by the container flag
https://github.com/BentoBoxWorld/BentoBox/issues/788
2019-06-26 20:51:02 -07:00
tastybento
3f217e30ad Adds involved player UUID to IslandDeleteEvent
https://github.com/BentoBoxWorld/BentoBox/issues/790
2019-06-26 19:03:56 -07:00
Florian CUNY
7c16908768 Added MC 1.14.3 as supported 2019-06-26 00:10:30 +02:00
tastybento
d6248a3577 Fixes code smells. 2019-06-23 19:13:00 -07:00
Florian CUNY
9798edebd5 Added package-info for all database type packages 2019-06-23 09:19:08 +02:00
Florian CUNY
bfcc50aeed Fixed CleanSuperFlatListener tests 2019-06-23 09:09:54 +02:00
YellowZaki
2cf4909bb9 Improved CleanSuperFlat check (#782)
* Fixed CleanSuperFlat enabled check

* Improved the checks

* fixed comment
2019-06-23 08:55:12 +02:00
tastybento
99d34d06ba Better blueprint bedrock handling
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
2019-06-22 22:44:33 -07:00
Florian CUNY
5dcec3ee1b Improved some documentation and added some nullability annotations in database code 2019-06-22 09:43:32 +02:00
Florian CUNY
dffabd4933 Release 1.5.3 2019-06-21 18:46:17 +02:00
Florian CUNY
ca8b9beb67 Improved logic for the "not allowed nether/end" messages 2019-06-21 18:31:15 +02:00
tastybento
9fd4f2422f Fixes issue where inventory is null. 2019-06-19 22:41:48 -07:00
tastybento
4b6ec575be Fixes bug when loaded a large number of islands.
Also attempts to fix duplicate islands during loading.

See https://github.com/BentoBoxWorld/BSkyBlock/issues/144
2019-06-19 20:44:59 -07:00
Florian CUNY
61d9d2810b Made all events extend BentoBoxEvent instead of PremadeEvent 2019-06-19 10:08:16 +02:00
tastybento
d4f54149c5 Automatically provides key-value pairs for BentoBoxEvents (#775)
* 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
2019-06-18 20:17:51 +02:00
tastybento
6c64fa020b hasNetherIsland and hasEndIsland return true if any block is seen
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
2019-06-18 08:48:07 -07:00
Florian CUNY
b8a0b15ed3 Added warning messages if 'allow-nether' or 'allow-end' are set to false
https://github.com/BentoBoxWorld/BentoBox/issues/741
2019-06-18 16:57:14 +02:00
Florian CUNY
f13fe4d225 Added a video to the "general.database.type" config option 2019-06-18 15:26:19 +02:00
Florian CUNY
dec28fe161 Added package-info in api/configuration package 2019-06-18 15:20:28 +02:00
Florian CUNY
0e4fdd307a Added ConfigEntry#video() 2019-06-18 15:20:04 +02:00
Florian CUNY
3ac89497ff Properly close file readers in JSONDatabaseHandler
Should fix https://github.com/BentoBoxWorld/BentoBox/issues/776
2019-06-18 14:51:16 +02:00
tastybento
15b602f331 Added CompositeCommand#call(...) (#772)
* Implements new call API for commands

https://github.com/BentoBoxWorld/BentoBox/issues/759

* pom.xml should not use tabs

* Improved javadoc

* refixed the since tag in javadoc
2019-06-18 14:33:03 +02:00
tastybento
c864ba7ab6 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-06-16 09:14:06 -07:00
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