Commit Graph

1851 Commits

Author SHA1 Message Date
tastybento
ab6a9978ff Added back non-static AddonEvent builder to not break API
Relates to https://github.com/BentoBoxWorld/Level/issues/119
2020-01-11 08:50:14 -08:00
Florian CUNY
9169242434 Made the island_name placeholders return default island name if no custom one is set
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1108
2020-01-11 11:55:51 +01:00
Florian CUNY
ffa873be68 Fixed a possible nullability bug in EnterExitListener 2020-01-11 11:53:50 +01:00
Florian CUNY
c307f9b844 Prevent loading Blueprint Bundles that have duplicate uniqueIds
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1117
I also slightly improved the logs.
2020-01-11 11:38:30 +01:00
Florian CUNY
31d92961b7 Added some nullability annotations in BlueprintsManager 2020-01-11 11:21:15 +01:00
tastybento
6361bb9a4e Removed chevron from javadoc 2020-01-10 16:50:24 -08:00
tastybento
8b27003cfb Stops velocity for player going through end portal to end
https://github.com/BentoBoxWorld/BentoBox/issues/1118
2020-01-10 15:41:59 -08:00
tastybento
1c500a0c05 Redstone on islands will operate if mods or ops are present
even if the offline redstone flag is active and no team members are
online. This enables staff to bypass the "Offline Redstone" feature,
which means if staff need to moderate players islands then redstone is
an issue.

Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1102
2020-01-07 17:20:04 -08:00
tastybento
90ad75baa9 Fixes config offset bug for island location.
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1105
2020-01-07 15:30:21 -08:00
tastybento
a3a0efb3a3 Removes only team members from island.
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1096
2020-01-07 13:12:53 -08:00
tastybento
aa5c253e03
Fix for double calling of events (#1111)
* Fixes tests for AdminSetrankCommand

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

* Fixes double calling of events.

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

* Makes AddonEvent static

https://github.com/BentoBoxWorld/BentoBox/pull/1111
2020-01-07 10:15:12 -08:00
tastybento
c385ee78f5 Lowers priority of banned command listener to catch before other plugins
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1103
2020-01-06 13:02:50 -08:00
tastybento
28200a44a8 Removed unused imports 2020-01-06 11:22:37 -08:00
Florian CUNY
a0718f0e6b Added a 3rd optional "island owner" argument to AdminSetrankCommand
Implements https://github.com/BentoBoxWorld/BentoBox/issues/787

This allows to coop or trust players on another player's island.
Related tests are ignored due to a lack of time to fix them.
2020-01-05 17:45:53 +01:00
Florian CUNY
ceef422c54 Improved tab-completion for AdminSetrankCommand
Relates to https://github.com/BentoBoxWorld/BentoBox/issues/787
2020-01-05 13:38:18 +01:00
Florian CUNY
85b4c4ff4a Added AdminBlueprintRenameCommand
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1082
2020-01-02 16:42:33 +01:00
Florian CUNY
53d728af94 Added LECTERN protection flag
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1094
2019-12-31 14:06:49 +01:00
Florian CUNY
85dc95357c Updated PAPER compatibility to SUPPORTED 2019-12-31 01:48:30 +01:00
Florian CUNY
4a209d875e Fixed players being stuck in SPECTATOR gamemode when accepting invite 2019-12-30 16:17:10 +01:00
Florian CUNY
c0a38fb9eb Fixed another bunch of code smells (Sonarcloud) 2019-12-30 15:36:17 +01:00
Florian CUNY
50c183d2ea Fixed incorrect translation when changing language 2019-12-30 15:25:19 +01:00
Florian CUNY
704c249b49 Fixed some code smells (Sonarcloud) 2019-12-30 14:54:11 +01:00
tastybento
e290a46c4e Fixed issue where addons were disabled incorrectly. 2019-12-29 14:56:22 +00:00
tastybento
602b5b5c5c Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-12-29 05:56:08 -08:00
tastybento
21eeedbbb0 Fixes addon disablement in onEnable.
Clean up imports.

https://github.com/BentoBoxWorld/BentoBox/issues/1090
2019-12-29 05:55:57 -08:00
Florian CUNY
1a8be26010 Fixed chorus flowers not being protected from breaking if destroyed by arrow/trident
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/812
Note it can cause the block to flicker or to turn into a ghost block. The Bukkit API does not provide a way to actually cancel the block breaking, therefore we need to resort to a delayed task.
2019-12-29 14:48:02 +01:00
Florian CUNY
efe8a55328 Removed unused imports from 6dac9cad30 2019-12-27 15:40:53 +01:00
Florian CUNY
6dac9cad30 Fixed Chorus being able to grow outside islands even if it was disabled
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1079
2019-12-27 15:37:47 +01:00
Florian CUNY
c179b3e20a Fixed entities being damaged by TNTs or Creepers even if it was disabled
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1075
2019-12-27 14:47:15 +01:00
Florian CUNY
a807918105 Fixed NewIsland.Builder#reason() logic (thanks to the unit tests) 2019-12-23 15:19:28 +01:00
Florian CUNY
48f898aa2c Added WorldSetting#isTeleportPlayerToIslandUponIslandCreation()
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1032
2019-12-23 15:01:32 +01:00
Florian CUNY
a796e3ae22 Forced reasons in NewIsland's Builder to be either CREATE or RESET 2019-12-23 14:32:33 +01:00
Florian CUNY
cd02c5f4df Renamed IslandWorldManager#pasteMissingIslands() to #isPasteMissingIslands() 2019-12-23 14:14:29 +01:00
Florian CUNY
acf87efd9b Added nullability annotations on User#hasPermission() and User#getSender() 2019-12-23 14:02:50 +01:00
Florian CUNY
2ad661b11a Improved the GitHub download feedback to be less spammy 2019-12-23 13:56:53 +01:00
tastybento
6b69052863 Fixes support for float storage in config files.
https://github.com/BentoBoxWorld/TwerkingForTrees/issues/6
2019-12-22 11:08:49 -08:00
tastybento
dfd8dffcf2 Catch error around deserialization and provide better logging.
This will help addon developers know where they went wrong. Related to:
https://github.com/BentoBoxWorld/TwerkingForTrees/issues/6
2019-12-22 09:40:42 -08:00
Florian CUNY
fc23da4343 Added Util#isInteger() and made commands use it for more reliability 2019-12-21 14:23:32 +01:00
Florian CUNY
1d486efbe7 Added AdminRangeAddCommand, AdminRangeRemoveCommand
Implemented https://github.com/BentoBoxWorld/BentoBox/issues/1072

Moved the various "invalid-value" messages to the admin range node in en-US.
Made AdminRangeSetCommand use the more generic 'must be positive number' message - causes issues with floats, which I will fix later on.
2019-12-21 11:34:38 +01:00
Florian CUNY
59916c27e2 Improved javadoc for Island#getProtectionRange() further 2019-12-21 11:12:48 +01:00
Florian CUNY
48b7b52d82 Improved javadoc for Island#getProtectionRange() 2019-12-21 11:10:33 +01:00
Florian CUNY
3e65f5e902 Fixed admin range set/reset commands not working if player is in team
Updated tests
2019-12-21 10:57:17 +01:00
tastybento
fd247be073 Added nullable/nonnull annotations to IslandsManager public methods 2019-12-20 16:51:21 -08:00
tastybento
1058f2dd64 Fixed tests for IslandTeamInviteAcceptCommand 2019-12-20 16:50:59 -08:00
Gabriele C
263e439722 Fixed accept command for non-team invites 2019-12-20 22:09:41 +01:00
tastybento
a9b8be0328 Added compatibility support for 1.15.1 2019-12-19 11:44:36 -08:00
tastybento
a025271629 Fixed message on trusting a player.
https://github.com/BentoBoxWorld/BentoBox/issues/1073
2019-12-17 11:30:59 -08:00
tastybento
27c1b6505c Uses and catches specific IOException for new islands
Relates to c3442c29ba
2019-12-16 17:24:48 -08:00
tastybento
e8810d41d9 Added a setting to be able to disable auto nether/end island pasting
https://github.com/BentoBoxWorld/BentoBox/issues/1063

Note that corresponding settings must be added to game mode addons.
Also, note that I added this as a default method so that it will not
break current older game mode addons.
2019-12-15 16:03:43 -08:00
tastybento
c3442c29ba Reworked how new island spots are found.
Fixed bug where max attempts check was not working, which could cause a
timeout crash.

https://github.com/BentoBoxWorld/BentoBox/issues/1057
2019-12-15 14:41:59 -08:00
Florian CUNY
5bddee702e Made the /[gamemode] spawn command a delayed teleport command
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1069
2019-12-14 11:06:10 +01:00
tastybento
fe570bd47d Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-12-11 22:17:50 -08:00
Geik
1da50da814 Update MariaDBDatabaseConnector.java (#1066) 2019-12-11 22:17:42 -08:00
tastybento
d58743bae8 Updated MyBiomeGrid to 1.15 API 2019-12-11 22:16:02 -08:00
tastybento
3332b65b86 Updated to 1.9.2 and server 1.15 compatibility.
Note - testing still in progress...
2019-12-10 18:10:51 -08:00
Florian CUNY
23c621544d Added Island#isOwned(), Island#isUnowned() and improved javadoc on Island#getOwner() 2019-12-07 13:51:38 +01:00
Florian CUNY
3d853d58f8 Fixed "gathering contribution data" messages not being toggled by the config option 2019-12-07 11:41:19 +01:00
tastybento
4b9b24e121 Fixed issue where Ops and mods had to stand still on teleport
https://github.com/BentoBoxWorld/BentoBox/issues/1059
2019-12-05 23:37:45 -08:00
tastybento
e511d1b9e9 Fixes banlist command number in unlimited case
Added test methods to confirm operation.

https://github.com/BentoBoxWorld/BentoBox/issues/1060
2019-12-05 22:37:03 -08:00
tastybento
55d0920a9c Added JavaDoc to AddonRequestBuilder 2019-12-05 22:20:13 -08:00
tastybento
22cd2379d3 Javadoc fixes 2019-12-01 09:03:22 -08:00
tastybento
294ed23225 Remove unused imports 2019-12-01 08:37:39 -08:00
Florian CUNY
35ecd61a11 Reduced default paste speed to 64 blocks/tick
Should help mitigate issues such as https://github.com/BentoBoxWorld/BentoBox/issues/1051 for new servers.
2019-12-01 12:11:12 +01:00
Florian CUNY
bd2473f597 Fixed COMMAND_RANKS flag still require the admin permission
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1050

It now uses the default permission behaviour.
2019-12-01 12:03:30 +01:00
Florian CUNY
13fab3173e Added AdminBlueprintDeleteCommand
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1048

Also added BlueprintsManager#deleteBlueprint(GameModeAddon, String)
Fixed a code smell in AdminBlueprintSaveCommand
2019-12-01 11:54:23 +01:00
tastybento
032b5c2988
Allows a space to be placed after a color code in locale files. (#1045)
Space will be stripped if it exists. This makes GitLocalize able to
machine translate much better.

Changes to the English locale file was made. Other languages do not have
to add spaces. Note that adding or removing spaces from files is easy
with regex.

https://github.com/BentoBoxWorld/BentoBox/issues/1044
2019-11-30 16:17:38 -08:00
tastybento
7737456309 Fixes issue with island protection range and permissions.
Permissions could set the island protection range greater than the
island distance.

This commit also fixes the User method that calculates the max value
from a permission. The default value was being used as the starting
point rather than 0, so it was not possible to set perms to go less than
the default value.

Added test clases around all these items.

https://github.com/BentoBoxWorld/BentoBox/issues/1047
2019-11-28 21:48:07 -08:00
tastybento
5f52b32cd3 Enables operation on 1.13.2 servers.
Avoids use of AbstractVillager for now. Alternative to PR
https://github.com/BentoBoxWorld/BentoBox/pull/1035
2019-11-25 21:17:41 -08:00
tastybento
ff60127762 Sanitizes blueprint and bundle names
https://github.com/BentoBoxWorld/BentoBox/issues/1038

Allows spaces to exist in the bundle names.

Added tests to check for bad chars and foreign chars in names.
2019-11-25 19:57:11 -08:00
tastybento
0e6061455f Fixes flow into adjacent islands when island abut.
https://github.com/BentoBoxWorld/BentoBox/issues/1034
2019-11-24 13:45:18 -08:00
tastybento
df40c3477c Verifies material exists on server and if not supplies AIR.
https://github.com/BentoBoxWorld/BentoBox/issues/1037
2019-11-20 18:02:30 -08:00
tastybento
336f4e9bd4 Explicitly cancels the portal if there is no nether or end.
https://github.com/BentoBoxWorld/BentoBox/issues/1036
2019-11-20 17:08:04 -08:00
tastybento
4753681b47 Fixes flow out of water logged blocks like slabs.
The check `isLiquid()` does not work for water logged blocks like slabs
or fences so it was possible for players to get liquids outside of the
the island.

https://github.com/BentoBoxWorld/BentoBox/issues/1034
2019-11-17 17:45:51 -08:00
Florian CUNY
9782ea1ef9 Clear the player's home locations when resetting. 2019-11-17 17:44:10 +01:00
tastybento
d65e0d4665 Adds to JavaDoc 2019-11-16 18:17:55 -08:00
tastybento
cd7b02fdf2 Excludes spawn island from offline redstone prevention flag
https://github.com/BentoBoxWorld/BentoBox/issues/1031
2019-11-16 10:22:46 -08:00
tastybento
2f4dae52e4 Changes island deletion loop to per second.
Previous setting was per tick, and the lowest value of 1 was set in the
config. By changing to per second, this value can be increased if
required. In testing, I see that smaller servers cannot cope even with a
setting of 1 per tick so I made this change. Also, island deletion can
occur slowly without issue.
2019-11-16 09:55:16 -08:00
tastybento
2c8739a48b Fixes damage to wandering traders.
https://github.com/BentoBoxWorld/BentoBox/issues/1029
2019-11-14 18:05:55 -08:00
tastybento
f67baf6501 Add protection for firework explosions from crossbows.
https://github.com/BentoBoxWorld/BentoBox/issues/1027
2019-11-14 17:44:56 -08:00
tastybento
c9b0c74d08
Paper lib (#1026)
* Remove unused imports

* Implements PaperLib within bentobox

* Added PaperLib methods to Util for addons to call

* Uses PaperLib for island deletion

* Point to https://github.com/BentoBoxWorld/MVdWPlaceholderAPI in POM
2019-11-13 15:10:33 -08:00
tastybento
e2fd5555cf Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-11-09 14:51:12 -08:00
Florian CUNY
a1b7df19c7 Added WorldSettings options to create island on first login
Implements https://github.com/BentoBoxWorld/BentoBox/issues/889
2019-11-09 17:50:27 +01:00
Florian CUNY
e5646c72cd Removed unneeded #isKnown() check in onJoin listener
Since the player is added to the player cache right before the check, the code is always executed.
2019-11-09 11:41:48 +01:00
tastybento
8dabdf46fe Simplify code in SafeSpotTeleport 2019-11-08 17:12:26 -08:00
tastybento
664040837d Uses replace instead of replaceAll as 1st param is not regex 2019-11-08 17:06:20 -08:00
tastybento
d3e35a9ecb Fixes item frame protection by flag. Also affects armor stands
https://github.com/BentoBoxWorld/BentoBox/issues/1023
2019-11-06 17:43:30 -08:00
tastybento
21e75c645e Return to previous code for BlockInterationListener 2019-11-06 08:32:06 -08:00
tastybento
86e39a801e Fixes bug with null flags
This class is called before all the flags are initialized so it cannot
reference them directly. This fixes the situation by using Strings, but
it can be improved.
2019-11-06 08:03:22 -08:00
tastybento
21916b5a59 Remove code smells. 2019-11-05 23:11:56 -08:00
tastybento
ef67079831 Fix for tests.
Note Flags cannot be used in class definitions without becoming nulls.
They have to be done in the constructor.
2019-11-05 22:36:28 -08:00
tastybento
c56b9bec18 Refactorer BlockInteractionListener and added test class
May fix:

https://github.com/BentoBoxWorld/BentoBox/issues/1023
2019-11-05 21:45:26 -08:00
tastybento
77a3797d3b Added EntityInteractListener test class & fixed bug
https://github.com/BentoBoxWorld/BentoBox/issues/1012
2019-11-05 18:26:17 -08:00
tastybento
e607b2b012 Fixes name tag check for villagers
https://github.com/BentoBoxWorld/BentoBox/issues/1012
2019-11-05 15:53:52 -08:00
tastybento
80d87d19f9 Include team members when sending banned players back to their island.
https://github.com/BentoBoxWorld/BentoBox/issues/1017
2019-11-05 09:49:11 -08:00
tastybento
25ad177aca Translate colors for blueprint descriptions.
https://github.com/BentoBoxWorld/BSkyBlock/issues/213
2019-11-02 17:09:47 -07:00
tastybento
c2f2be61c3 Translate alternate colors codes for BBundle descriptions 2019-11-02 17:04:32 -07:00
tastybento
1ab7222ca0 Log error if commands cannot be run on leaving. 2019-11-02 17:03:55 -07:00
tastybento
0324d3e123 Remove code smell on MobSpawnListener 2019-10-30 18:56:12 -07:00
tastybento
de2f2a22ce Addresses new types of creature spawning for 1.14.x servers
https://github.com/BentoBoxWorld/BentoBox/issues/1020
2019-10-30 14:16:47 -07:00
tastybento
44a7f26c04 Makes log a warning for players who cannot be teleported home. 2019-10-30 14:16:26 -07:00
Florian CUNY
ca6f344c70 Improved the configuration file introduction 2019-10-30 14:15:33 +01:00
tastybento
b9a04bcf57 Added protection around addon onDisable().
https://github.com/BentoBoxWorld/BentoBox/issues/1018
2019-10-29 17:52:24 -07:00
tastybento
9ff2eda576 Avoid setting banner pattern if none exist (null)
https://github.com/BentoBoxWorld/BentoBox/issues/1016
2019-10-29 17:44:45 -07:00
Florian CUNY
6607060b99 Added a "reset all the settings" button to the player Settings Panel
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1011
2019-10-28 17:42:43 +01:00
Florian CUNY
5ef74bd0f4 Fixed some code smells 2019-10-28 10:04:44 +01:00
tastybento
a27f54a6f7 Fixes tests for IslandTeamCommand 2019-10-27 13:26:22 -07:00
Florian CUNY
85b45df13b Improved the IslandTeamCommand: added last joined timestamp for offline team members
Redid the whole layout - it looks much nicer now!
Implements https://github.com/BentoBoxWorld/BentoBox/issues/997
2019-10-27 13:35:29 +01:00
tastybento
1304f8bace Makes SQLite deletion of non-existent items fail silently
Adds JavaDoc to make this clear.

https://github.com/BentoBoxWorld/BentoBox/issues/1010
2019-10-26 11:56:12 -07:00
tastybento
d5d6f20bb9 Remove imports 2019-10-25 17:31:24 -07:00
Florian CUNY
ca6ab33898 Added javadoc since tags for the newly added methods in PanelItem and builder
Also improved the #isPlayerHead() methods
2019-10-24 14:12:16 +02:00
YellowZaki
87ea48443f Added ability to have player heads with custom name (#1007)
* Added new attribute playerHeadName

* Added method PanelItem#getPlayerHeadName() and PanelItemBuilder#getPlayerHeadName()

* Added playerHeadName attribute

* getPlayerHeadName instead of getName
2019-10-24 14:00:14 +02:00
Florian CUNY
551975d6c9 Added Credits GUI for addons and BentoBox
Implements https://github.com/BentoBoxWorld/BentoBox/issues/993
2019-10-24 13:56:06 +02:00
Florian CUNY
856572941e Removed no longer needed allow-nether and allow-end warnings
Fixed https://github.com/BentoBoxWorld/BentoBox/issues/977
2019-10-22 09:45:37 +02:00
Florian CUNY
8692685822 Improved user feedback when pasting (creation/reset) an island
Implements https://github.com/BentoBoxWorld/BentoBox/issues/996
2019-10-21 17:55:35 +02:00
Florian CUNY
ba35d7c062 Simplified methods in BlueprintPaster
There wasn't the need for that many parameters in each method.
2019-10-21 15:20:02 +02:00
Florian CUNY
a904882726 Removed the long-deprecated Flags#TNT flag
It was deprecated as of 1.5.0.
2019-10-20 14:57:57 +02:00
Florian CUNY
4f297614a3 Fixed DYE signs protection not working on most recent 1.14 versions
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/999

I simply removed the server compatibility check right away, since we're expected to be full 1.14 as of a few versions already.
2019-10-20 14:56:54 +02:00
Florian CUNY
3fd92f05e8 Improved error handling when establishing a MongoDB connection
Also improved the "error" messages when the credentials in the config are not correct.
2019-10-19 22:57:19 +02:00
tastybento
c67f1ac48b Made method calls more robust.
Calling these methods using a valid world but one that was not a
gameworld created an NPE. Now they respond with a default value.
2019-10-19 11:32:18 -07:00
tastybento
784988ca54 Test class cleanup. Use Bukkit direct calls instead of Bukkit.getServer 2019-10-18 19:33:24 -05:00
tastybento
02e8243bd0 Fixed admin register of spawn island.
https://github.com/BentoBoxWorld/BentoBox/issues/991
2019-10-18 19:32:54 -05:00
tastybento
bee960d823 Fixes invites.
https://github.com/BentoBoxWorld/BentoBox/issues/988

Adds test classes for IslandTeam command and redoes
IslandTeamInviteCommand test class.
2019-10-17 20:43:01 -07:00
NotMyFault
0d5ff1eaf4 Add cake protection flag (#986)
Implements #987.

* Add cake protection flag

* Improved CONTAINER flag description
2019-10-17 07:41:34 +02:00
tastybento
595de7a602 Waits until blueprints loaded before firing BentoBoxReady event
https://github.com/BentoBoxWorld/BentoBox/issues/985
2019-10-13 21:02:25 -07:00
Leonardo Chaia
2484421d92 Allows customizing where islands are created (#984)
Implements https://github.com/BentoBoxWorld/BentoBox/issues/983.

* Allows customizing where islands are created

NewIsland receives a new interface which determines the location
where the next island will be created

A default implementation is provided which mirrors the previous behavior

* Adds autors to DefaultNewIslandLocationStrategy

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

* Improves Javadocs

Co-Authored-By: Florian CUNY <poslovitch@bentobox.world>
2019-10-13 16:11:59 +02:00
Florian CUNY
77e0f01510 Added options to reset player's health, hunger and XP
Implements https://github.com/BentoBoxWorld/BentoBox/issues/958

Added the following methods in WorldSettings and IslandWorldManager:
* #isOnJoinResetHealth()
* #isOnJoinResetHunger()
* #isOnJoinResetXP()
* #isOnLeaveResetHealth()
* #isOnLeaveResetHunger()
* #isOnLeaveResetXP()
2019-10-13 10:29:32 +02:00
tastybento
6f96f47ae5 Adds invites to trust and coop (#971)
Implements https://github.com/BentoBoxWorld/BentoBox/issues/800

* WIP

* Generic invites for team, coop and trusting.

Needs play testing.

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

* Fixed tests and added handling in trust and coop commands

* Completes invite, trust and coops command and tests.

* Minor documentation/settings improvements

* Renamed InviteType to Invite.Type

* Fixed compilation error
2019-10-13 09:28:49 +02:00
tastybento
d27ea949d0 Fixes potential error in asyncSaveAll of players
https://github.com/BentoBoxWorld/BentoBox/issues/982
2019-10-11 08:39:45 -07:00
tastybento
7d8539b4cd Should fix CHM error in asyncSaveAll
https://github.com/BentoBoxWorld/BentoBox/issues/982
2019-10-11 08:36:23 -07:00
tastybento
e9e10eed75 Fixes island near command for team members.
https://github.com/BentoBoxWorld/BentoBox/issues/981
2019-10-10 08:14:00 -07:00
tastybento
6085deff49 Clears home locations when admin kicking a player
https://github.com/BentoBoxWorld/BentoBox/issues/980
2019-10-09 12:57:29 -07:00
tastybento
2db926f640 Spreads out backup database saving to avoid lag
https://github.com/BentoBoxWorld/BentoBox/issues/976
2019-10-07 16:16:26 -07:00
Florian CUNY
27647da6f4 Force the Blueprint name to be lowercased using English locale 2019-10-05 22:22:25 +02:00
tastybento
94ff2ebf75 Tie banned falling command to world flag and fix bugs
https://github.com/BentoBoxWorld/BentoBox/issues/863
2019-10-03 14:11:32 -07:00
tastybento
215c79d74d Now with a fall distance check!
https://github.com/BentoBoxWorld/BentoBox/issues/863
2019-10-03 13:42:40 -07:00
tastybento
42ba6dcc50 Adds banned commands when falling to WorldSettings
To complete the functionality, the addon will need to overrider the
banned falling command method

https://github.com/BentoBoxWorld/BentoBox/issues/863
2019-10-03 13:34:03 -07:00
tastybento
75ec023249 Creates a spot for a player to teleport to if there is none available.
https://github.com/BentoBoxWorld/BentoBox/issues/963
2019-10-03 13:01:14 -07:00
tastybento
b448df5418 Improves mob removal on teleport.
Will not remove mobs for chorus fruit, ender pearl or spectator
teleports. Will not remove mobs if the teleport distance is less than
the mob removal distance.
Mob teleport removal is already a world setting.
2019-10-02 16:11:15 -07:00
tastybento
7bf0de9eda Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-09-30 15:38:15 -07:00
tastybento
8c037fc1a3 Shifted GSON conversion to main thread to avoid concurrent modification
https://github.com/BentoBoxWorld/BentoBox/issues/968
2019-09-30 15:38:00 -07:00
tastybento
d2502a6289 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-09-29 16:31:51 -07:00
tastybento
8a1d969103 Added ability to reset one island flag to default for all islands
https://github.com/BentoBoxWorld/BentoBox/issues/958
2019-09-29 14:35:15 -07:00
Florian CUNY
477f60ae03 Added Banner patterns support in Blueprints
Implements https://github.com/BentoBoxWorld/BentoBox/issues/961
2019-09-29 10:26:39 +02:00
Florian CUNY
a415a65e7e Added AdminResetsAddCommand and AdminResetsRemoveCommand 2019-09-29 09:59:20 +02:00
Florian CUNY
6c3667e3ed Improved success messages for AdminResetsSetCommand and AdminResetsResetCommand
Also allowed AdminResetsSetCommand to set the resets to 0.
2019-09-29 09:55:00 +02:00
Florian CUNY
e20690935a Fixed AdminDeathsRemoveCommand allowing to set a negative number of deaths
Also fixed the "[total]" textvariable not working in its success message
2019-09-29 09:18:22 +02:00
tastybento
f8c4ea568f Adds auto-updating of locale files
https://github.com/BentoBoxWorld/BentoBox/issues/960
2019-09-28 17:10:30 -07:00
Florian CUNY
6799c43a0a Added AdminDeathsAddCommand and AdminDeathsRemoveCommand
Implements https://github.com/BentoBoxWorld/BentoBox/issues/950
2019-09-28 14:37:29 +02:00
Florian CUNY
d9dc337de9 Should fix NPE when setting up connection to GitHub 2019-09-28 14:21:16 +02:00
Florian CUNY
93219cbc1c Merge branch 'commands-on-island-creation' into develop 2019-09-28 13:55:01 +02:00
Florian CUNY
c53fece28f Added WorldSettings to run commands on island creation/join and deletion/leave
Implements https://github.com/BentoBoxWorld/BentoBox/issues/704

Gamemode addons will need to be updated to use the new WorldSettings, which have been properly documented so it should be easy to write down comments about them.
2019-09-28 13:48:24 +02:00
tastybento
2f7a4b2528 move entity attribute setting 2019-09-26 08:52:57 -07:00
tastybento
bd34f2c4bc Reordered to Java spec 2019-09-26 08:18:46 -07:00
tastybento
d6e4280a44 Removed todos in code. If they are needed, let's make an issue in Github 2019-09-26 08:17:01 -07:00
tastybento
3e94418e54 Fix nullable annotations in PanelItemBuilder
If null checks are being done, then the parameter annotation must be
@Nullable.
2019-09-26 08:15:43 -07:00
tastybento
0f63353e2b Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-09-26 08:11:10 -07:00
tastybento
18c374bfa9 Add null protection for player death requests. 2019-09-25 13:46:34 -07:00
BONNe
ff04f407af Fixed noban, noexpel and bypassexpel permissions (#956) 2019-09-25 12:33:20 +02:00
BONNe
6b42d07185 Prevent to set null as icon in PanelItems. (#957)
Add protection code from null types of icons in PanelItemBuilder.
Relates to https://github.com/BentoBoxWorld/BSkyBlock/issues/203
2019-09-25 12:06:08 +02:00
tastybento
4d045aa966 Removed debug. 2019-09-21 16:50:20 -07:00
tastybento
2e8a3e2abb Protects sweet berry bushes
https://github.com/BentoBoxWorld/BentoBox/issues/948
2019-09-20 18:57:18 -07:00
tastybento
55544ada0a Fixes island respawn bug.
Not all players were respawning on their island. Also, deaths in nether
or end did not teleport back to overworld island.
2019-09-20 18:39:50 -07:00
tastybento
86da94182c Reduces safe spot search radius and checks a few more chunks per tick
https://github.com/BentoBoxWorld/BentoBox/issues/952
2019-09-20 15:16:09 -07:00
tastybento
ff1c984fd0 Teleports instantly to end if location is safe
https://github.com/BentoBoxWorld/BentoBox/issues/952
2019-09-20 12:56:49 -07:00
tastybento
c5c5731ce3 Return null if user/player is null
Relates to https://github.com/BentoBoxWorld/Level/issues/86
2019-09-20 11:58:33 -07:00
tastybento
ad33d7fc9d Added a stack trace for this error handling. 2019-09-20 11:57:41 -07:00
tastybento
60e85d6512 No wither damage on non-BentoBox game worlds
https://github.com/BentoBoxWorld/BentoBox/issues/954
2019-09-19 15:37:45 -07:00
tastybento
6cd8c70bd4 Pastes default nether or end blueprints if island doesn't exist
Fixes issue where the nether-island or end-island named blueprints were
deleted.

https://github.com/BentoBoxWorld/BentoBox/issues/943
2019-09-15 14:10:52 -07:00
BONNe
fd5f4841b2 Fixed HeadGetter overwriting item amount (#941) 2019-09-14 21:53:28 +02:00
Florian CUNY
115f434a30 Added parsing placeholders in entities' name when pasting blueprints
Implements https://github.com/BentoBoxWorld/BentoBox/issues/898
Also adds a few nullability annotations
2019-09-14 21:51:28 +02:00
BONNe
4206435d65 Easier addon getter by their name (#939)
* Easier addon getter by their name

A small improvement to get a certain addon from its name.
This allows getting addon main class without the necessity to cast if afterwards (as the cast is done in `getAddonByName()` method).

* Use cast on CompositeCommand#getAddons()

This will allow getting correct addon class without casting in code.
Casting will be done in CompositeCommand#getAddons() method.
2019-09-14 21:12:18 +02:00
tastybento
6154e65b6e Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-09-13 20:44:03 -07:00
tastybento
deb21e7ed6 Adds GameModeAddon method that is called when BentoBox loads all addons.
Required to fix https://github.com/BentoBoxWorld/BentoBox/issues/940
2019-09-13 20:43:53 -07:00
tastybento
5164b1a02d Leader should not see kicked message
Adds test to make sure leader does not see kicked string and fixes
ignores.
2019-09-13 20:41:14 -07:00
tastybento
797f7146dc Fixed standard nether and end spawn protection. Added test class.
https://github.com/BentoBoxWorld/BentoBox/issues/927
2019-09-12 16:53:35 -07:00
tastybento
65e4868641 Adds try around Vault hook.
https://github.com/BentoBoxWorld/BentoBox/issues/938
2019-09-12 13:04:27 -07:00
tastybento
5c1824050a Added protection against incompatible Dynmap plugins
https://github.com/BentoBoxWorld/BentoBox/issues/938
2019-09-12 07:59:26 -07:00
tastybento
24b1689b03 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-09-08 07:41:33 -07:00
tastybento
692f506261 Merge remote-tracking branch 'origin/separate_world_gens' into develop 2019-09-08 07:40:46 -07:00
Florian CUNY
87e4aeb9fb Added a warning on startup stating to switch from YAML asap 2019-09-08 16:20:48 +02:00
Florian CUNY
d957a50fc1 Fixed compilation issue 2019-09-08 15:37:18 +02:00
Florian CUNY
835f152a45 Decreased default values for 'island.paste-speed' and 'island.delete-speed'
Also updated config comments.
These new values are more suitable to 1.14+ servers, on which chunk loading causes a lot of performance issues.
2019-09-08 15:35:00 +02:00
Florian CUNY
06893223d9 Added 'since' and improved comments for 'island.delete-speed' in config.yml 2019-09-08 15:12:50 +02:00
Florian CUNY
6f16c28591 Fixed a few code smells 2019-09-08 15:10:00 +02:00
Florian CUNY
6aff686763 Made the 'owner kicked you from island' message more precise
Implements https://github.com/BentoBoxWorld/BentoBox/issues/923
This also adds a message sent to island members when the owner resets the island.
2019-09-08 15:04:41 +02:00
Florian CUNY
c90fb88590 Improved "unhandled exception" message in WebManager 2019-09-08 14:49:35 +02:00
Florian CUNY
5cd2df08b8 Catch JsonParseExceptions in WebManager when parsing weblink's json files 2019-09-08 14:49:11 +02:00
tastybento
94cb0fb188 Sets table storage engine to be explicitly InnoDB for MySQL
https://github.com/BentoBoxWorld/BentoBox/issues/934
2019-09-07 11:14:20 -07:00
tastybento
e0c3e41fb4 Fixes multiverse bugs. Needs testing. 2019-09-07 11:01:35 -07:00
tastybento
678f7cf5fc Only register generator with multiverse if a generator is available. 2019-09-04 16:09:42 -07:00
tastybento
f9a5f05987 Adds a delete speed option to BentoBox's config.yml
Reduces the chunk regen speed to 1 chunk per tick or 3 chunks/tick if
there is a nether and end world.
2019-08-31 17:13:19 -07:00
tastybento
2f35a6c77c Sets pos1 and pos2 after pasting island and show clipboard. 2019-08-31 16:39:38 -07:00
tastybento
a8c44ff028 Shifted to using 1.14.4 materials.
Still compatible with 1.13.2.

Fixes https://github.com/BentoBoxWorld/BentoBox/issues/893
2019-08-30 21:01:15 -07:00
tastybento
60d7dfef85 Adds constructor to IslandResetCommand to allow no pasting
This is for games like SkyGrid that do not need pasting of a blueprint.
2019-08-30 10:16:05 -07:00
tastybento
bbbe2565eb Fixed two security issues from sonar 2019-08-29 15:41:56 -07:00
tastybento
fa4c772572 Fixes IslandResetCommand test 2019-08-29 15:32:50 -07:00
tastybento
87168a5ea9 Compile against Spigot 1.14.4 (#919)
Fixes #914.

* Shifts to compile with 1.14.4 API.

Note that this will make some events incompatible with 1.13.2 because of
a class not found error.

* WIP

* Fixed deprecated APIs and ItemStackAdapter test case

* Fixes enderchest test bug.

* Updated server version compatibilities in ServerCompatibility
2019-08-29 21:18:45 +02:00
Florian CUNY
b6fa468b4a Fixed 'Island Respawn' not working for island members
It only worked for the island owner
2019-08-29 14:18:14 +02:00
Florian CUNY
ff95450638 Resetting the islands now automatically kicks all island members
Implements https://github.com/BentoBoxWorld/BentoBox/issues/922
* Improved colors in 'commands.island.reset.resets-left' in en-US locale
* Added a confirmation message to IslandResetCommand, which states about the change ('commands.island.reset.confirmation')
* Subsequently removed the restriction asking to kick all island members prior to resetting the island
* TeamEvent.TeamDeleteEvent is now called upon the kick of the island members, meaning the actual deletion of the team as a side effect.
2019-08-29 14:17:14 +02:00
Florian CUNY
85a5b5b6bc Added SPAWNER_SPAWN_EGGS (WORLD_SETTING) flag
https://github.com/BentoBoxWorld/BentoBox/issues/768
2019-08-29 13:35:35 +02:00
Florian CUNY
c01bb33ce1 Fixed IslandNearCommand not working for island members 2019-08-29 01:14:30 +02:00
Florian CUNY
eea91b6269 Added 'island.name.uniqueness' in the config
Implements https://github.com/BentoBoxWorld/BentoBox/issues/899
Edited IslandsManager#nameExists(...) to strip colors.
2019-08-28 14:44:55 +02:00
Florian CUNY
f63f73a3b7 Added IslandsManager#nameExists(World, String) 2019-08-28 14:29:20 +02:00
Florian CUNY
e8ea537160 Added another nullability annotation 2019-08-28 14:21:31 +02:00
Florian CUNY
edb6d11fc2 Added IslandsManager and IslandCache#getIslands(World) 2019-08-28 14:21:08 +02:00
Florian CUNY
4e86441f6f Added nullability annotations in IslandCache, IslandsManager and Util 2019-08-28 14:19:42 +02:00
Florian CUNY
d41f35e58d Improved config comments for island name related settings 2019-08-28 13:45:38 +02:00
Florian CUNY
9dafeb1d19 Added "since 1.6.0" to Settings#clearRadius 2019-08-28 13:45:11 +02:00
tastybento
1c50bfb21a Added NOSONAR comment 2019-08-27 19:23:48 -07:00
tastybento
b4c2853f27 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-08-27 09:08:31 -07:00
tastybento
52d0544726 Rewrote JSON object loading to avoid throwing exception
Related to 68f90edb2f
2019-08-27 09:08:22 -07:00
Florian CUNY
bcb2f70eca Added the ability to have non-country-specific localizations
This allows us to have, e.g. 'fr', while being able to also distinguish 'fr-FR' and 'fr-CA', or in the case the language is mostly spoken in a single country (e.g. latvian) to only have 'lv' as the name of the file.
As the filename filter has been made drastically laxer than it previously was, it will also allow to create localizations "variants" which will probably be of no use to us, but it's allowed by the terms of the various ISO standards and therefore it's good to at least have the possibility to support that kind of thing.
2019-08-27 13:19:00 +02:00
BONNe
ead0b02454 Added various new panel types (#917)
* Add multiple different types of panel.
- Inventory panel -> current
- Hooper panel -> 5 slot panel
- Dropper panel -> 9 slot in 3 rows

* code formatting and javadoc improvements in Panel

* renamed PanelType to Type

* updated to new enum name + javadoc
2019-08-27 11:52:26 +02:00
tastybento
a0d61006e0 Improved SafeSpotTeleport to limit chunks scanned per tick
Related to https://github.com/BentoBoxWorld/SkyGrid/issues/24
2019-08-26 19:19:45 -07:00
tastybento
ab81074c4d Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-08-26 19:17:32 -07:00
Florian CUNY
72b6e1c852 Added a "0 players" category to the playersPerServer metrics chart 2019-08-26 15:43:12 +02:00
Florian CUNY
fad8dd64ae Improved logging for the CleanSuperFlat 2019-08-26 15:26:29 +02:00
tastybento
e4aa19eb87 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-08-25 20:04:28 -07:00
tastybento
a2c42ffcc7 Added IslandInfoCommand test case.
Fixed bug where info with a name would only work with island owners.
2019-08-25 18:13:45 -07:00
tastybento
495c82a720 Added admin getrank command test class.
Fixed bug with getrank permission.

PDX > SJC
2019-08-25 12:49:54 -07:00
BONNe
5c3f53ccfb Disable physic applying on regeneration (#913)
There is no valid reason why block physic should be updated in regen, while in chunk-gen it is disabled.
2019-08-25 17:43:11 +02:00
tastybento
6808e755d0 Fixes entry event and messaging when teleporting from another world
https://github.com/BentoBoxWorld/BentoBox/issues/911
2019-08-21 21:19:52 -07:00
tastybento
b4d662843b Fixes next arrow showing when there is nothing on next page
https://github.com/BentoBoxWorld/BentoBox/issues/904
2019-08-18 18:13:14 -07:00
tastybento
c764444fa5 Fixes loading of SQLite tables.
Bug was affecting addons that single table entries.

https://github.com/BentoBoxWorld/BentoBox/issues/902
2019-08-18 17:26:08 -07:00
tastybento
33b4c70f25 Adds tabbed panel method to hide tab if it is empty.
https://github.com/BentoBoxWorld/BentoBox/issues/896
2019-08-17 19:08:00 -07:00
Florian CUNY
612683f728 Removed the legacy placeholder format for gamemode default placeholders 2019-08-17 13:27:13 +02:00
tastybento
08e520565d Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-08-16 08:27:05 -07:00
tastybento
3e827068c9 Fixes trident vanishing when visitor attacks mobs
https://github.com/BentoBoxWorld/BentoBox/issues/846
2019-08-16 08:26:56 -07:00
tastybento
b9215d62b8 Added IslandDeletionManager test class 2019-08-15 12:53:20 -07:00
tastybento
fce8a65501 Shifted unban command to canExecute API and updated test class. 2019-08-14 10:49:04 -07:00
Florian CUNY
267c9c73d8 Fixed NPE when opening the Settings Panel with some flags being hidden
The NPE could only occur if a non-op player was trying to open the Settings Panel or change tab or change mode, leading to the call of a null PanelItem.

I added some nullability annotations to make it 100% clear that Flag#toPanelItem(...) returns null if the player is not op and the flag is invisible.
2019-08-13 15:04:31 +02:00
Florian CUNY
7b78267027 Removed %[gamemode]_island_spawnpoint% placeholder 2019-08-13 13:27:04 +02:00
Florian CUNY
1ae3171340 Removed deprecated methods/classes
PremadeEvent, NewIsland.Builder#world()
2019-08-13 11:14:53 +02:00
Florian CUNY
68f90edb2f Fixed another code smell in JSONDatabaseHandler 2019-08-13 11:12:46 +02:00
Florian CUNY
537b854c75 Fixed some code smells
Added TextVariables#NEXT
2019-08-13 10:53:07 +02:00
Florian CUNY
90fd6a625f Fixed duplicated code in flag events (added abstract FlagChangeEvent) 2019-08-13 10:37:55 +02:00
Florian CUNY
98e6468386 Added Flags display mode chart in Metrics 2019-08-13 10:27:19 +02:00
tastybento
fb169304cc Pegs banlist command to same rank level as ban command
https://github.com/BentoBoxWorld/BentoBox/issues/891
2019-08-12 19:13:29 -07:00
tastybento
e86fb09cf9 Allows island team members as well as the owner to see the ban list
https://github.com/BentoBoxWorld/BentoBox/issues/891
2019-08-12 18:49:02 -07:00
Florian CUNY
21b7ce4b75 Replaced icons of a few flags to better alternatives
BREAK_BLOCKS: STONE -> STONE_PICKAXE
PLACE_BLOCKS: GRASS -> OAK_PLANKS
ITEM_DROP: BEETROOT_SOUP -> DIAMOND
ITEM_PICKUP: BEETROOT_SEEDS -> SUGAR_CANE
2019-08-13 00:22:52 +02:00
tastybento
2f78957d31 Implements Basic/Advanced/Expert settings panels (#888)
* Implements Basic/Advanced/Expert settings panels

Better alternative to https://github.com/BentoBoxWorld/BentoBox/pull/887

* Remove StatusIcon class - not used.

* Fixes glow of active tab.

* Moved FlagMode to Flag.Mode

* Display the LOCK flag no matter what the tab is

* Made the "mode" being saved for the player instead of per-tab
This means that a player will have its "mode" saved when he comes back later in the Settings Panel while also making the navigation more fluent - he won't need to set PROTECTION and SETTING to the same mode everytime.

Also renamed Flag.Mode#getNextFlag() to #getNext()
Added PlayersManager#setFlagsDisplayMode(UUID, Flag.Mode), #getFlagsDisplayMode(UUID)

* Play a sound when click on the mode button

* Added a description to the "mode" item

* Modified the mode for some flags
2019-08-12 23:54:05 +02:00
tastybento
54f44cf30f Range permission was not used when making new island
https://github.com/BentoBoxWorld/BentoBox/issues/664

Added test class for NewIsland class
2019-08-10 15:11:46 -07:00
tastybento
80a5727ec1 Moved settings panels into Admin Settings and adds generic admin panel
Admin panel now can look at users and also set world/system settings.

User settings panel is now just island protection and settings.
2019-08-10 11:46:49 -07:00
tastybento
982072caad Unloads chunks after deletion if they were not loaded originally.
This should reduce GC activity.
2019-08-10 11:45:44 -07:00
tastybento
b5202c3944 Code smell improvements and null protections 2019-08-10 11:44:29 -07:00
tastybento
1d6dba8d59 Adds WitherFlag 2019-08-10 11:41:01 -07:00
tastybento
186b14a67f Adds Wither damage world settings flag. 2019-08-10 11:40:07 -07:00
Florian CUNY
795cc562aa Added Hooks and "players per server" Metrics charts 2019-08-10 14:00:46 +02:00
Florian CUNY
8119b5c99e Moved Flag events to api/events/flags package 2019-08-10 13:15:33 +02:00
tastybento
21fd9e9e1a Fix for console error when using the player command in console
https://github.com/BentoBoxWorld/BentoBox/issues/886
2019-08-09 14:08:21 -07:00
tastybento
e6fd6e02b7 Complexity reduction 2019-08-07 22:51:16 -07:00
tastybento
d4814a6219 Added BlockEndDragon test and reduced code duplication 2019-08-07 22:35:49 -07:00
tastybento
dc728ba0dc Added test class for LanguagePanel 2019-08-07 21:13:59 -07:00
tastybento
6dca821d74 Avoids error if locale name is empty
https://github.com/BentoBoxWorld/BentoBox/issues/883
2019-08-07 18:28:13 -07:00
tastybento
0ddae268f7 Fixes bug with where nether or end worlds with non-standard names
https://github.com/BentoBoxWorld/BentoBox/issues/877
2019-08-06 16:34:08 -07:00
tastybento
e5986d7a72
Updated YamlDatabaseHandler
Added (String) case to the second reference of new PropertyDescriptor. https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8212636
2019-08-05 13:33:56 -07:00
tastybento
d4bbc423bf
Updated YamlDatabaseHandler
Added type casting to code as a workaround to try and resolve a compile issue for Java 11. See https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8212636
2019-08-05 13:31:45 -07:00
tastybento
44cbd81320 Moved to Mockito 2 and PowerMock 2019-08-04 21:44:46 -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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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