Commit Graph

2154 Commits

Author SHA1 Message Date
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
1557bcab61 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2019-09-20 11:58:43 -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
7e3e7541c3
Gitlocalize 9225 (#955)
* Translate zh-CN.yml
2019-09-20 07:12:57 -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
BONNe
1ace6faded Update latvian translation (#935) 2019-09-08 16:28:57 +02:00
Florian CUNY
f4f33bbb72 Release 1.7.0 2019-09-08 16:22:14 +02: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
SrAcosta
1406534266 Updated es translation (#929)
* Translate es.yml via GitLocalize

* Translate es.yml via GitLocalize
2019-09-07 14:44:56 +02: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
3cf6e2921b Renamed locale files to work with GitLocalize 2019-08-27 19:32:06 -07: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
BONNe
b9f7d42afa Translate lv-LV.yml via GitLocalize (#918) 2019-08-26 22:27:06 -07: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
57ee8ef48e Release 1.6.0 2019-08-14 10:11:57 +02: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
Florian CUNY
44d406bcbd
Fixed invalid color code in en-US locale
Entry was: commands.admin.switchto.success
2019-08-13 10:08:28 +02:00
BONNe
2fa23cf49e Update lv-LV.yml (#892) 2019-08-13 10:05:22 +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
Florian CUNY
996a4e3df4 Added a few more translations in fr-FR locale 2019-08-12 13:32:58 +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
78a126ef05 locale for Wither flag. 2019-08-10 11:40:23 -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
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
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